diff --git a/lib/repl.js b/lib/repl.js index 6345c742f68f33..1bdfe0f185dd86 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -880,7 +880,7 @@ REPLServer.prototype.setPrompt = function setPrompt(prompt) { }; REPLServer.prototype.turnOffEditorMode = util.deprecate( - function() { _turnOffEditorMode(this); }, + function deprecateCB() { _turnOffEditorMode(this); }, 'REPLServer.turnOffEditorMode() is deprecated', 'DEP0078'); @@ -1401,7 +1401,7 @@ function _turnOffEditorMode(repl) { function defineDefaultCommands(repl) { repl.defineCommand('break', { help: 'Sometimes you get stuck, this gets you out', - action: function() { + action: function defineDefaultCommandsAction() { this.clearBufferedCommand(); this.displayPrompt(); } @@ -1415,7 +1415,7 @@ function defineDefaultCommands(repl) { } repl.defineCommand('clear', { help: clearMessage, - action: function() { + action: function defineCommandClearAction() { this.clearBufferedCommand(); if (!this.useGlobal) { this.outputStream.write('Clearing context...\n'); @@ -1427,14 +1427,14 @@ function defineDefaultCommands(repl) { repl.defineCommand('exit', { help: 'Exit the repl', - action: function() { + action: function defineCommandExitAction() { this.close(); } }); repl.defineCommand('help', { help: 'Print this help message', - action: function() { + action: function defineCommandHelpAction() { const names = Object.keys(this.commands).sort(); const longestNameLength = names.reduce( (max, name) => Math.max(max, name.length), @@ -1453,7 +1453,7 @@ function defineDefaultCommands(repl) { repl.defineCommand('save', { help: 'Save all evaluated commands in this REPL session to a file', - action: function(file) { + action: function defineCommandSaveAction(file) { try { fs.writeFileSync(file, this.lines.join('\n') + '\n'); this.outputStream.write('Session saved to: ' + file + '\n'); @@ -1466,7 +1466,7 @@ function defineDefaultCommands(repl) { repl.defineCommand('load', { help: 'Load JS from a file into the REPL session', - action: function(file) { + action: function defineDefineCommandLoadAction(file) { try { var stats = fs.statSync(file); if (stats && stats.isFile()) {