docs/lib/WebModule.js
function(moduleName, moduleClosure) {
        var wm = this; // GLOBAL.WebModule

        // https://github.com/uupaa/WebModule/wiki/SwitchModulePattern
        var alias = wm[moduleName] ? (moduleName + "_") : moduleName;

        if (!wm[alias]) { // secondary module already exported -> skip
            wm[alias] = moduleClosure(GLOBAL); // evaluate the module entity
            wm.closure[alias] = moduleClosure + ""; // stock

            if (wm.publish && !GLOBAL[alias]) {
                GLOBAL[alias] = wm[alias]; // publish to global
            }
        }
        return wm[alias];
    }
function(moduleName, moduleClosure) {
        var wm = this; // GLOBAL.WebModule

        // https://github.com/uupaa/WebModule/wiki/SwitchModulePattern
        var alias = wm[moduleName] ? (moduleName + "_") : moduleName;

        if (!wm[alias]) { // secondary module already exported -> skip
            wm[alias] = moduleClosure(GLOBAL); // evaluate the module entity
            wm.closure[alias] = moduleClosure + ""; // stock

            if (wm.publish && !GLOBAL[alias]) {
                GLOBAL[alias] = wm[alias]; // publish to global
            }
        }
        return wm[alias];
    }
function ( moduleName , moduleClosure ) { var wm = this ; // GLOBAL.WebModule // https://github.com/uupaa/WebModule/wiki/SwitchModulePattern var alias = wm [ moduleName ] ? ( moduleName + "_" ) : moduleName ; if ( ! wm [ alias ] ) { // secondary module already exported -> skip wm [ alias ] = moduleClosure ( GLOBAL ) ; // evaluate the module entity wm . closure [ alias ] = moduleClosure + "" ; // stock if ( wm . publish && ! GLOBAL [ alias ] ) { GLOBAL [ alias ] = wm [ alias ] ; // publish to global } } return wm [ alias ] ; }
module script stocker
module script stocker