lib/pxutil.js
function prepareCustomParams(config, dict) {
    const customParams = {
        'custom_param1': '',
        'custom_param2': '',
        'custom_param3': '',
        'custom_param4': '',
        'custom_param5': '',
        'custom_param6': '',
        'custom_param7': '',
        'custom_param8': '',
        'custom_param9': '',
        'custom_param10': ''
    };
    if (config.ENRICH_CUSTOM_PARAMETERS) {
        const enrichedCustomParams = config.ENRICH_CUSTOM_PARAMETERS(customParams);
        for (const param in enrichedCustomParams) {
            if (param.match(/^custom_param([1-9]|10)$/) && enrichedCustomParams[param] !== '') {
                dict[param] = enrichedCustomParams[param];
            }
        }
    }
}
function prepareCustomParams(config, dict) {
    const customParams = {
        'custom_param1': '',
        'custom_param2': '',
        'custom_param3': '',
        'custom_param4': '',
        'custom_param5': '',
        'custom_param6': '',
        'custom_param7': '',
        'custom_param8': '',
        'custom_param9': '',
        'custom_param10': ''
    };
    if (config.ENRICH_CUSTOM_PARAMETERS) {
        const enrichedCustomParams = config.ENRICH_CUSTOM_PARAMETERS(customParams);
        for (const param in enrichedCustomParams) {
            if (param.match(/^custom_param([1-9]|10)$/) && enrichedCustomParams[param] !== '') {
                dict[param] = enrichedCustomParams[param];
            }
        }
    }
}
function prepareCustomParams ( config , dict ) { const customParams = { 'custom_param1' : '' , 'custom_param2' : '' , 'custom_param3' : '' , 'custom_param4' : '' , 'custom_param5' : '' , 'custom_param6' : '' , 'custom_param7' : '' , 'custom_param8' : '' , 'custom_param9' : '' , 'custom_param10' : '' } ; if ( config . ENRICH_CUSTOM_PARAMETERS ) { const enrichedCustomParams = config . ENRICH_CUSTOM_PARAMETERS ( customParams ) ; for ( const param in enrichedCustomParams ) { if ( param . match ( / ^custom_param([1-9]|10)$ / ) && enrichedCustomParams [ param ] !== '' ) { dict [ param ] = enrichedCustomParams [ param ] ; } } } }
prepareCustomParams - if there's a enrich custom params handler configured on startup,
it will populate to @dict with the proper custom params
@param {pxconfig} config - The config object of the application
@param {object} dict - the object that should be populated with the custom params
prepareCustomParams - if there s a enrich custom params handler configured on startup it will populate to