MCPcopy Create free account
hub / github.com/dashnowords/imfe / _checkModulePath

Function _checkModulePath

chapter04/2.brief-require/require.js:107–114  ·  view source on GitHub ↗

* 在路径注册表中查询模块路径 * @param {string} moduleName 模块名

(moduleName)

Source from the content-addressed store, hash-verified

105 * @param {string} moduleName 模块名
106 */
107 function _checkModulePath(moduleName){
108 let path = modulePaths[moduleName];
109 if(path){
110 _loadModule(moduleName,path);
111 }else{
112 throw new Error('查询的模块不存在');
113 }
114 }
115
116 /**
117 * 模块加载方法

Callers 3

_requireFunction · 0.85
_defineFunction · 0.85
_setUnResolvedFunction · 0.85

Calls 1

_loadModuleFunction · 0.85

Tested by

no test coverage detected