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

Method getCompiledCode

lib/script.js:315–323  ·  view source on GitHub ↗

* Get the compiled code. * * @private * @return {string} The code.

()

Source from the content-addressed store, hash-verified

313 * @return {string} The code.
314 */
315 getCompiledCode() {
316 if (!this._compiledCode) {
317 const comp = this._compiler(this._prefix + removeShebang(this._code) + this._suffix, this.filename);
318 const res = transformer(null, comp, false, false, this.filename);
319 this._compiledCode = res.code;
320 this._hasAsync = res.hasAsync;
321 }
322 return this._compiledCode;
323 }
324
325 /**
326 * Compiles this script to a vm.Script.

Callers 1

_compileMethod · 0.95

Calls 2

removeShebangFunction · 0.85
transformerFunction · 0.85

Tested by

no test coverage detected