UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

21 lines 781 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setGlobalVar = exports.getGlobalVar = void 0; const constants_1 = require("../../configuration/constants"); const getGlobalConfig = () => { return typeof window[constants_1.CLASSPREFIX] === "undefined" ? Object.defineProperty(window, `${constants_1.CLASSPREFIX}`, { value: {}, writable: true, })[constants_1.CLASSPREFIX] : window[constants_1.CLASSPREFIX]; }; const getGlobalVar = (varname) => { return getGlobalConfig()[varname]; }; exports.getGlobalVar = getGlobalVar; const setGlobalVar = (varname, value) => { return (getGlobalConfig()[varname] = value); }; exports.setGlobalVar = setGlobalVar; //# sourceMappingURL=globalVars.js.map