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

Method _compileNodeVMStrict

lib/script.js:381–387  ·  view source on GitHub ↗

* Will return the cached version of the script intended for NodeVM in strict mode 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

379 * @throws {SyntaxError} If there is a syntax error in the script.
380 */
381 _compileNodeVMStrict() {
382 let script = this._compiledNodeVMStrict;
383 if (!script) {
384 this._compiledNodeVMStrict = script = this._compile(STRICT_MODULE_PREFIX, MODULE_SUFFIX);
385 }
386 return script;
387 }
388
389}
390

Callers 1

runMethod · 0.80

Calls 1

_compileMethod · 0.95

Tested by

no test coverage detected