From cffbfba4df31f546261a65301ee842cbff323d19 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Tue, 13 Dec 2016 01:43:37 +0200 Subject: [PATCH] doc: replace anonymous functions in repl.md Replaced with an object shorthand and an arrow function. PR-URL: https://github.com/nodejs/node/pull/10244 Reviewed-By: Anna Henningsen Reviewed-By: Sakthipriyan Vairamani Reviewed-By: James M Snell --- doc/api/repl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/repl.md b/doc/api/repl.md index cd4c3db960..268aa70c74 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -328,14 +328,14 @@ const repl = require('repl'); const replServer = repl.start({prompt: '> '}); replServer.defineCommand('sayhello', { help: 'Say hello', - action: function(name) { + action(name) { this.lineParser.reset(); this.bufferedCommand = ''; console.log(`Hello, ${name}!`); this.displayPrompt(); } }); -replServer.defineCommand('saybye', function() { +replServer.defineCommand('saybye', () => { console.log('Goodbye!'); this.close(); });