MCPcopy Create free account
hub / github.com/codesandbox/codesandbox-client / load

Method load

packages/node-services/src/module.ts:67–80  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

65 }
66
67 load(filename: string) {
68 if (this.loaded) {
69 throw new Error('Loaded already');
70 }
71
72 this.filename = filename;
73
74 let extension = path.extname(filename) || '.js';
75 if (!Module._extensions[extension]) extension = '.js';
76
77 Module._extensions[extension](this, filename);
78
79 this.loaded = true;
80 }
81
82 require(path: string) {
83 return Module._load(path, this);

Callers 15

_loadMethod · 0.95
SnippetsStorageFunction · 0.45
loader.jsFile · 0.45
iFunction · 0.45
tFunction · 0.45
workerMain.jsFile · 0.45
oFunction · 0.45
tFunction · 0.45
doRunFunction · 0.45
main.jsFile · 0.45
loader.jsFile · 0.45
iFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected