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

Method run

src/client/sandbox.mjs:75–81  ·  view source on GitHub ↗
(code, output)

Source from the content-addressed store, hash-verified

73 }
74
75 async run(code, output) {
76 if (output) this.output = output
77 this.startedAt = Date.now()
78 this.extraSecs = typeof code == "string" && /promtDirection/.test(code) ? 0.1 : 2
79 this.win.__c = 0
80 return this.prepare(code).then(code => this.sandbox_run(code)).catch(err => this.error(err))
81 }
82
83 // Should be above all user-run code, so that the stack trace can be
84 // cut off at this point.

Callers 4

setupEnvMethod · 0.95
nextSandboxFunction · 0.80
runCodeMethod · 0.80
runCodeFunction · 0.80

Calls 3

prepareMethod · 0.95
sandbox_runMethod · 0.95
errorMethod · 0.95

Tested by

no test coverage detected