MCPcopy Create free account
hub / github.com/TruthHun/BookStack / setModule

Function setModule

static/webuploader/webuploader.fis.js:40–53  ·  view source on GitHub ↗
( id, factory, args )

Source from the content-addressed store, hash-verified

38
39 // 设置module, 兼容CommonJs写法。
40 setModule = function( id, factory, args ) {
41 var module = {
42 exports: factory
43 },
44 returned;
45
46 if ( typeof factory === 'function' ) {
47 args.length || (args = [ _require, module.exports, module ]);
48 returned = factory.apply( null, args );
49 returned !== undefined && (module.exports = returned);
50 }
51
52 modules[ id ] = module.exports;
53 },
54
55 // 根据id获取module
56 getModule = function( id ) {

Callers 1

_defineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected