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

Function eval

test/parallel/test-repl-eval-error-after-close.js:16–22  ·  view source on GitHub ↗
(_cmd, _context, _file, cb)

Source from the content-addressed store, hash-verified

14
15 const { replServer, output } = startNewREPLServer({
16 eval(_cmd, _context, _file, cb) {
17 // eslint-disable-next-line node-core/must-call-assert
18 close$.promise.then(() => {
19 cb(new Error('Error returned from the eval callback'));
20 eval$.resolve();
21 });
22 },
23 });
24
25 replServer.write('\n');

Calls 3

cbFunction · 0.70
thenMethod · 0.45
resolveMethod · 0.45

Tested by 2

testFunction · 0.56
testFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…