@limetech/lime-elements
Version:
29 lines (26 loc) • 668 B
JavaScript
;
class ConfigClass {
constructor() {
this.iconPath = '';
this.defaultLocale = navigator.language;
this.featureSwitches = getFeatureSwitches(localStorage);
}
}
function getFeatureSwitches(storage) {
const features = {};
for (let i = 0; i < storage.length; i++) {
const key = storage.key(i);
const value = storage.getItem(key);
if (!['true', 'false'].includes(value)) {
continue;
}
features[key] = value === 'true';
}
return features;
}
const config = new ConfigClass();
const globalConfig = (() => {
return config;
})();
exports.globalConfig = globalConfig;
//# sourceMappingURL=config-e7e1a299.js.map