Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 3x 3x 5339x 5339x 3x 39x 39x 39x | const MPI_CONFIG_KEY = '__mpi' /** * Get the Segment Wrapper config from window * @param {string=} key Key config to extract. If not provided, all the config will be returned * @return {any} Config value or all the config if not key provided */ export const getConfig = key => { const config = window?.[MPI_CONFIG_KEY]?.segmentWrapper || {} return key ? config[key] : config } /** * Set a config value to the Segment Wrapper config * @param {string} key Config key to update * @param {boolean|string|number|object} value Value to set on the config key */ export const setConfig = (key, value) => { window[MPI_CONFIG_KEY] = window[MPI_CONFIG_KEY] || {} window[MPI_CONFIG_KEY].segmentWrapper = window[MPI_CONFIG_KEY].segmentWrapper || {} window[MPI_CONFIG_KEY].segmentWrapper[key] = value } |