summaryrefslogtreecommitdiff
path: root/lib/repl.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-26 05:21:27 +0100
committerMichaël Zasso <targos@protonmail.com>2019-03-30 13:16:39 +0100
commitf86f5736da72ad4f3fb50692461222590e2f0258 (patch)
tree6fee263bfca24abbf76b7a3f1517b8184c29f077 /lib/repl.js
parentf0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27 (diff)
downloadnode-new-f86f5736da72ad4f3fb50692461222590e2f0258.tar.gz
benchmark,lib: change var to const
Refs: https://github.com/nodejs/node/pull/26679 PR-URL: https://github.com/nodejs/node/pull/26915 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'lib/repl.js')
-rw-r--r--lib/repl.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/repl.js b/lib/repl.js
index 7a55d6b35c..288278687c 100644
--- a/lib/repl.js
+++ b/lib/repl.js
@@ -565,7 +565,7 @@ function REPLServer(prompt,
}
function _parseREPLKeyword(keyword, rest) {
- var cmd = this.commands[keyword];
+ const cmd = this.commands[keyword];
if (cmd) {
cmd.action.call(this, rest);
return true;
@@ -597,7 +597,7 @@ function REPLServer(prompt,
return;
}
- var empty = self.line.length === 0;
+ const empty = self.line.length === 0;
self.clearLine();
_turnOffEditorMode(self);
@@ -793,12 +793,12 @@ exports.start = function(prompt,
useGlobal,
ignoreUndefined,
replMode) {
- var repl = new REPLServer(prompt,
- source,
- eval_,
- useGlobal,
- ignoreUndefined,
- replMode);
+ const repl = new REPLServer(prompt,
+ source,
+ eval_,
+ useGlobal,
+ ignoreUndefined,
+ replMode);
if (!exports.repl) exports.repl = repl;
replMap.set(repl, repl);
return repl;
@@ -854,7 +854,7 @@ REPLServer.prototype.createContext = function() {
});
}
- var module = new CJSModule('<repl>');
+ const module = new CJSModule('<repl>');
module.paths =
CJSModule._resolveLookupPaths('<repl>', parentModule, true) || [];