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

Method finishExecution

lib/repl.js:578–589  ·  view source on GitHub ↗
(err, result)

Source from the content-addressed store, hash-verified

576
577 let finished = false;
578 function finishExecution(err, result) {
579 if (finished) return;
580 finished = true;
581
582 // After executing the current expression, store the values of RegExp
583 // predefined properties back in `savedRegExMatches`
584 for (let idx = 1; idx < savedRegExMatches.length; idx += 1) {
585 savedRegExMatches[idx] = RegExp[`$${idx}`];
586 }
587
588 cb(err, result);
589 }
590
591 if (!err) {
592 // Unset raw mode during evaluation so that Ctrl+C raises a signal.

Callers

nothing calls this directly

Calls 1

cbFunction · 0.50

Tested by

no test coverage detected