Internal method used by environment adapters to complete a load event.
A load event could be a script load or just a load pass from a synchronous
load call.
@param {String} moduleName the name of the module to potentially complete.
426749
function (moduleName) {
                var found, args, mod,
                    shim = config.shim[moduleName] || {},
                    shExports = shim.exports;

                takeGlobalQueue();

                while (defQueue.length) {
                    args = defQueue.shift();
                    if (args[0] === null) {
                        args[0] = moduleName;
                        //If already found an anonymous module and bound it
                        //to this name, then this is some other anon module
                        //waiting for its completeLoad to fire.
                        if (found) {
                            break;
                        }
                        found = true;
                    } else if (args[0] === moduleName) {
                        //Found matching define call for this script!
                        found = true;
                    }

                    callGetModule(args);
                }

                //Do this after the cycle of callGetModule in case the result
                //of those calls/init calls changes the registry.
                mod = registry[moduleName];

                if (!found && !defined[moduleName] && mod && !mod.inited) {
                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
                        if (hasPathFallback(moduleName)) {
                            return;
                        } else {
                            return onError(makeError('nodefine',
                                             'No define call for ' + moduleName,
                                             null,
                                             [moduleName]));
                        }
                    } else {
                        //A script that does not call define(), so just simulate
                        //the call for it.
                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
                    }
                }

                checkLoaded();
            }
303467
function hasLoaded($moduleName)
    {
        if (!is_string($moduleName))
            throw new \InvalidArgumentException(sprintf(
                'Invalid module name, "%s".'
                , \Poirot\Std\flatten($moduleName)
            ));

        return in_array($moduleName, $this->listLoadedModules());
    }
168441
public void load(ScriptEngine engine) {
        try {
            //module loading
            engine.eval("load('" + getResourceAsURLStirng("/eclairjs/EclairJS_Globals.js") + "');");
            engine.eval("load('" + getResourceAsURLStirng("/eclairjs/ModuleUtils.js") + "');");
            engine.eval("load('" + getResourceAsURLStirng("/eclairjs/jvm-npm/jvm-npm.js") + "');");
            engine.eval("load('" + getResourceAsURLStirng("/eclairjs/Serialize.js") + "');");

            NashornEngineSingleton.setEngine(engine);
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
1092718
function searchCache(moduleName, callback) {
        // Resolve the module identified by the specified name
        var mod = module.constructor._resolveFilename(moduleName, module);

        // Check if the module has been resolved and found within
        // the cache
        if (mod && (mod = module.constructor._cache[mod]) !== undefined) {
            // Recursively go over the results
            (function run(mod) {
                // Go over each of the module's children and
                // run over it
                mod.children.forEach(function (child) {
                    return run(child);
                });

                // Call the specified callback providing the
                // found module
                callback(mod);
            })(mod);
        }
    }
1060711
function loadScript(src, loadedCallback) {
    var script = document.createElement("script");
    script.setAttribute("type", "text/javascript");
    script.setAttribute("src", src);

    // Call the callback when the script is loaded.
    script.onload = loadedCallback;
    script.onreadystatechange = function () {
      if (this.readyState === "complete" || this.readyState === "loaded") {
        loadedCallback();
      }
    };

    head.appendChild(script);
  }
249246
public void deleteModule(String moduleName) throws Exception {

        OpenCms.getModuleManager().deleteModule(
            m_cms,
            moduleName,
            false,
            new CmsShellReport(m_cms.getRequestContext().getLocale()));
    }
1181536
function load() {
  if (!loaded) {
    var addons = [], skipped = [];

    // load addon modules
    api.require.forEach(['socketstream-*','socketstream.*'],function(mod,id) {
      if (typeof mod === 'function') {
        try {
          mod(api);
          addons.push(id);
        } catch(ex) {
          debug('Failed to load '+id+'. ',ex);
        }
      } else {
        skipped.push(id);
      }
    });
    debug('Addons: '+
      addons.length? addons.join(' + ') + ' Loaded. ':' None. '+
      skipped.length? skipped.join(' + ') + ' Skipped. ':'');

    // load assets in cache
    http.load();

    // Load Client Asset Manager
    client.load();

    // Load internal and project responders
    api.server.responders = exports.responders.load();

    api.server.eventTransport = publish.transport.load();

    // Extend the internal API with a publish object you can call from your own server-side code
    api.publish = publish.api(api.server.eventTransport);

    // Bind responders to websocket
    ws.load(api.server.responders, api.server.eventTransport);

    debug('API loaded.');
  }
  loaded = true;
}
706507
function(moduleId) {
		var scriptEl = document.createElement('script');
		scriptEl.type = 'text/javascript';
		scriptEl.src = resolveModuleUri(moduleId);

		var useStandard = !!scriptEl.addEventListener,
			timeoutHandle;

		var errorFunc = function() {
			postLoadFunc(false);
		};

		var loadFunc = function() {
			if (useStandard || (scriptEl.readyState == 'complete' || scriptEl.readyState == 'loaded')) {
				postLoadFunc(getModule(moduleId).defined);
			}
		};

		var postLoadFunc = function(loaded) {
			clearTimeout(timeoutHandle);

			if (useStandard) {
				scriptEl.removeEventListener('load', loadFunc, false);
				scriptEl.removeEventListener('error', errorFunc, false);
			}
			else {
				scriptEl.detachEvent('onreadystatechange', loadFunc);
			}

			if (!loaded) {
				var module = getModule(moduleId);
				if (!module.defined) {
					module.defined = module.error = true;
					fireCallbacks();
				}
			}
		};

		if (useStandard) {
			scriptEl.addEventListener('load', loadFunc, false);
			scriptEl.addEventListener('error', errorFunc, false);
		}
		else {
			scriptEl.attachEvent('onreadystatechange', loadFunc);
		}

		timeoutHandle = setTimeout(errorFunc, _timeoutLength);

		head.appendChild(scriptEl);
	}
315627
function scriptTag(src, callback)  {
		
		var elem = doc.createElement('script');		
		elem.type = 'text/' + (src.type || 'javascript');
		elem.src = src.src || src;  
			
		elem.onreadystatechange = elem.onload = function() {
			var state = elem.readyState;

			if (!callback.done && (!state || /loaded|complete/.test(state))) {
				callback.call();
				callback.done = true;
			}
			
			// cleanup. IE runs into trouble
			if (!ie) {			
				head.removeChild(elem);
			}
		}; 
		
		head.appendChild(elem); 
	}
1298817
public final Module loadAddonModule(Addon addon) throws ModuleLoadException
   {
      try
      {
         this.currentAddon.set(addon);
         ModuleIdentifier moduleId = moduleCache.getModuleId(addon);
         Module result = loadModule(moduleId);
         return result;
      }
      catch (ModuleLoadException e)
      {
         throw e;
      }
      finally
      {
         this.currentAddon.remove();
      }
   }
1025204
function requireMaybe(moduleName) {
  try {
    var modulePath = require.resolve(moduleName);
  } catch (e) {
    return null;
  }
  // just let this fall through
  return require(moduleName);
}
240820
function teardown(moduleName, e, moduleNames) {
	var moduleNames = moduleNames || {};

	if(disposeModule(moduleName, e, moduleNames)) {
		// Delete the module and call teardown on its parents as well.
		var parents = loader.getDependants(moduleName);

		for(var i = 0, len = parents.length; i < len; i++) {
			teardown(parents[i], e, moduleNames);
		}
	}

	return moduleNames;
}
500947
function(name, cb){
		if(shuttingDown == true)
			return;
		if(!package.dependencies[name] && name != "isnode-mod-logger"){
			var error = { message: "Failed to load "+name+" Module - Module not referenced in node package file" };
			if(cb) { cb(error, null); }
			modules.logger.log("startup","ISNode System > " + error.message + ".");
			return; 
		}
		var modPresent = isModuleAvailable(name);
		if(modPresent){
			var nameSplit = name.split("-");
			if(nameSplit[0] != "isnode" && nameSplit[1] != "mod"){
				var error = { message: "Attempted to load a non 'ismod' or 'isnode' module with the isnode module loader" };
				modules.logger.log("warning","ISNode System > " + error.message + ".");
				if(cb) { cb(error, null); }
				return;
			} else if (nameSplit[2] == "interface" && nameSplit[3]){
				try {
					modules.interfaces[nameSplit[3]] = require(name)(isnode);
					var output = {
						success: true,
						message: "Interface module ("+nameSplit[3]+") successfully loaded"
					}
					modules.logger.log("debug", "ISNode System > " + output.message);
					if(cb) { cb(null,output); }
					return;
				} catch (err) {
					var error = { message: "System Error. Attempted to load module that does not exist - " + name };
					modules.logger.log("error","ISNode System > " + error.message, err);
					if(cb) { cb(error, null); }
					return;					
				}
			} else if (nameSplit[2] != "interface" && !nameSplit[3]) {
				try {
					modules[nameSplit[2]] = require(name)(isnode);
					var output = {
						success: true,
						message: "Standard module ("+nameSplit[2]+") successfully loaded"
					}
					modules.logger.log("debug", output.message + ".");
					if(cb) { cb(null, output); }
					return;
				} catch (err) {
					var error = { message: "System Error. Attempted to load module that does not exist - " + name, error: err };
					modules.logger.log("error","ISNode System > " + error.message+".", err);
					if(cb) { cb(error, null); }
					return;					
				}
			} else {
				var error = { message: "Attempted to load an unsupported ismod module with the ismod module loader" };
				modules.logger.log("warning","ISNode System > " + error.message + ".");
				if(cb) { cb(error, null); }
				return;
			}
		} else {
			if(name == "isnode-mod-logger"){
				modules.logger = {
					log: function(level,logMsg,attrObj){
						console.log("("+level+") "+logMsg);
					}
				}
				var error = { message: "Logger module not available. Polyfill method loaded in its place" };
				modules.logger.log("warning","ISNode System > " + error.message + ".");
				if(cb) { cb(error, null); }
			} else {
				var error = { message: "Attempted to load an ismod module ("+name+") that does not exist. Try running 'npm install'." };
				modules.logger.log("warning","ISNode System > " + error.message + ".");
				if(cb) { cb(error, null); }
			}
			return;
		}
	}
122102
static boolean needLoad(String moduleLoadList, String moduleName) {
        String[] activatedModules = StringUtils.splitWithCommaOrSemicolon(moduleLoadList);
        boolean match = false;
        for (String activatedModule : activatedModules) {
            if (StringUtils.ALL.equals(activatedModule)) {
                match = true;
            } else if (activatedModule.equals(moduleName)) {
                match = true;
            } else if (match && (activatedModule.equals("!" + moduleName)
                || activatedModule.equals("-" + moduleName))) {
                match = false;
                break;
            }
        }
        return match;
    }
81923
function tryRenameExternalModule(moduleName) {
                if (renamedDependencies && moduleName.text in renamedDependencies) {
                    return "\"" + renamedDependencies[moduleName.text] + "\"";
                }
                return undefined;
            }
1225191
function byModule($moduleName)
    {
        if (!$this->hasLoaded($moduleName))
            $this->loadModule($moduleName);

        return $this->_c__loadedModules[$moduleName];
    }
1251354
public function includeJsModule(string $moduleName, bool $async = false, $config = null)
    {
        return Template::raw(
            Twigpack::$plugin->manifest->getJsModuleTags($moduleName, $async, $config)
        );
    }