Event: 'exit'
function () {}
Emitted when the user exits the REPL in any of the defined ways. Namely, typing .exit
at the repl, pressing Ctrl+C twice to signal SIGINT
, or pressing Ctrl+D to signal 'end'
on the input
stream.
Example of listening for exit
:
replServer.on('exit', () => { console.log('Got "exit" event from repl!'); process.exit(); });
Please login to continue.