From 5f8aa1fcb17febd2ea899da0af62ec2c33a23760 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 549aa4d2b0c988..8069d3e9a877f8 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(); });