summaryrefslogtreecommitdiff
path: root/lib/readline.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline.js')
-rw-r--r--lib/readline.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/readline.js b/lib/readline.js
index 57c2d6aff3..b25cf9ee64 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -32,6 +32,8 @@ const {
MathCeil,
MathFloor,
MathMax,
+ NumberIsFinite,
+ NumberIsNaN,
ObjectDefineProperty,
ObjectSetPrototypeOf,
} = primordials;
@@ -117,7 +119,7 @@ function Interface(input, output, completer, terminal) {
prompt = input.prompt;
}
if (input.escapeCodeTimeout !== undefined) {
- if (Number.isFinite(input.escapeCodeTimeout)) {
+ if (NumberIsFinite(input.escapeCodeTimeout)) {
this.escapeCodeTimeout = input.escapeCodeTimeout;
} else {
throw new ERR_INVALID_OPT_VALUE(
@@ -139,7 +141,7 @@ function Interface(input, output, completer, terminal) {
}
if (typeof historySize !== 'number' ||
- Number.isNaN(historySize) ||
+ NumberIsNaN(historySize) ||
historySize < 0) {
throw new ERR_INVALID_OPT_VALUE.RangeError('historySize', historySize);
}