MCPcopy
hub / github.com/patriksimek/vm2 / _compileNodeVM

Method _compileNodeVM

lib/script.js:366–372  ·  view source on GitHub ↗

* Will return the cached version of the script intended for NodeVM or compile it. * * @private * @return {vm.Script} The compiled script * @throws {SyntaxError} If there is a syntax error in the script.

()

Source from the content-addressed store, hash-verified

364 * @throws {SyntaxError} If there is a syntax error in the script.
365 */
366 _compileNodeVM() {
367 let script = this._compiledNodeVM;
368 if (!script) {
369 this._compiledNodeVM = script = this._compile(MODULE_PREFIX, MODULE_SUFFIX);
370 }
371 return script;
372 }
373
374 /**
375 * Will return the cached version of the script intended for NodeVM in strict mode or compile it.

Callers 1

runMethod · 0.80

Calls 1

_compileMethod · 0.95

Tested by

no test coverage detected