MCPcopy Index your code
hub / github.com/nodejs/node / executeCode

Function executeCode

deps/v8/test/mjsunit/mjsunit.js:587–593  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

585 };
586
587 function executeCode(code) {
588 if (typeof code === 'function') return code();
589 if (typeof code === 'string') return eval(code);
590 failWithMessage(
591 'Given code is neither function nor string, but ' + (typeof code) +
592 ': <' + prettyPrinted(code) + '>');
593 }
594
595 assertException = function assertException(e, type_opt, cause_opt) {
596 if (type_opt !== undefined) {

Callers 1

mjsunit.jsFile · 0.70

Calls 3

codeFunction · 0.70
evalFunction · 0.70
prettyPrintedFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…