getConfig = (field) => {
    const config = globalObj._config;
    const userConfig = globalObj._state._userConfig;

    return field
        ? config[field] || userConfig[field]
        : {...config, ...userConfig, cookie:{...config.cookie}};
}
Return configuration object or just one of its fields.
@param {string} field
@returns {any}