MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / require

Method require

src/client/sandbox.mjs:109–113  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

107 }
108
109 require(name) {
110 let found = resolved.get(name)
111 if (!found) throw new Error(`Could not load module '${name}'`)
112 return this.loaded.get(found.name).exports
113 }
114
115 async setHTML(code, output) {
116 this.clearEvents()

Callers 2

evalModuleMethod · 0.95
setupEnvMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected