MCPcopy
hub / github.com/bytenode/bytenode / runBytecode

Function runBytecode

lib/index.js:377–385  ·  view source on GitHub ↗
(bytecodeBuffer)

Source from the content-addressed store, hash-verified

375 * @returns {any} The result of the very last statement executed in the script.
376 */
377const runBytecode = function (bytecodeBuffer) {
378 if (!isBuffer(bytecodeBuffer)) {
379 throw new Error('bytecodeBuffer must be a buffer object.');
380 }
381
382 const script = generateScript(bytecodeBuffer);
383
384 return script.runInThisContext();
385};
386
387/**
388 * Compiles JavaScript file to .jsc file.

Callers 1

runBytecodeFileFunction · 0.85

Calls 2

isBufferFunction · 0.85
generateScriptFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…