We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f281b19 commit cffbfbaCopy full SHA for cffbfba
doc/api/repl.md
@@ -328,14 +328,14 @@ const repl = require('repl');
328
const replServer = repl.start({prompt: '> '});
329
replServer.defineCommand('sayhello', {
330
help: 'Say hello',
331
- action: function(name) {
+ action(name) {
332
this.lineParser.reset();
333
this.bufferedCommand = '';
334
console.log(`Hello, ${name}!`);
335
this.displayPrompt();
336
}
337
});
338
-replServer.defineCommand('saybye', function() {
+replServer.defineCommand('saybye', () => {
339
console.log('Goodbye!');
340
this.close();
341
0 commit comments