vargate.js
function checkDefined(key) {
            //noinspection JSPotentiallyInvalidUsageOfThis
            if (! data[`${this.moduleName}.${key}`] && typeof parent.get(key) !== 'undefined' && ! util.squelch()) {
                // Not allowing sub-modules to name variables already defined in the parent (unless using override).
                // Things get weird when expecting a variable defined in two places.
                //noinspection JSPotentiallyInvalidUsageOfThis
                util.throw(`In "${this.moduleName}" variable "${key}" defined in module "${parent.moduleName}". Choose a different name.`);
            }
        }
function checkDefined(key) {
            //noinspection JSPotentiallyInvalidUsageOfThis
            if (! data[`${this.moduleName}.${key}`] && typeof parent.get(key) !== 'undefined' && ! util.squelch()) {
                // Not allowing sub-modules to name variables already defined in the parent (unless using override).
                // Things get weird when expecting a variable defined in two places.
                //noinspection JSPotentiallyInvalidUsageOfThis
                util.throw(`In "${this.moduleName}" variable "${key}" defined in module "${parent.moduleName}". Choose a different name.`);
            }
        }
function checkDefined ( key ) { //noinspection JSPotentiallyInvalidUsageOfThis if ( ! data [ ` ${ this . moduleName } ${ key } ` ] && typeof parent . get ( key ) !== 'undefined' && ! util . squelch ( ) ) { // Not allowing sub-modules to name variables already defined in the parent (unless using override). // Things get weird when expecting a variable defined in two places. //noinspection JSPotentiallyInvalidUsageOfThis util . throw ( ` ${ this . moduleName } ${ key } ${ parent . moduleName } ` ) ; } }
Used to prevent users from overriding a key without using a function meant to explicitly do so.
Only works when `window.DEV_MODE` is 'strict' or 'warn'
@param {string} key
Used to prevent users from overriding a key without using a function meant to explicitly do so . Only works when window . DEV_MODE is strict or warn