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

Function setModule

static/webuploader/webuploader.withoutimage.js:43–56  ·  view source on GitHub ↗
( id, factory, args )

Source from the content-addressed store, hash-verified

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

Callers 1

_defineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected