summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDonggeon Lim <ooqwe486@gmail.com>2019-12-11 14:17:27 +0000
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2020-02-06 02:49:09 +0000
commit1c2d699ed8e192cfb0f6cc456edc05d85b7f36bc (patch)
tree611e8c2a527c4465fd40713c1e9b8033e6c99ef5 /lib
parentf54dc362a9f95820d0e57127502ce19a7da12109 (diff)
downloadnode-new-1c2d699ed8e192cfb0f6cc456edc05d85b7f36bc.tar.gz
lib: use strict equality comparison
Change '==' to '===' in v8_prof_polyfill.js, punycode.js. PR-URL: https://github.com/nodejs/node/pull/30898 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/v8_prof_polyfill.js2
-rw-r--r--lib/punycode.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/internal/v8_prof_polyfill.js b/lib/internal/v8_prof_polyfill.js
index 33e5783566..0b94496fff 100644
--- a/lib/internal/v8_prof_polyfill.js
+++ b/lib/internal/v8_prof_polyfill.js
@@ -41,7 +41,7 @@ const os = {
// Filter out vdso and vsyscall entries.
const arg = args[args.length - 1];
if (arg === '[vdso]' ||
- arg == '[vsyscall]' ||
+ arg === '[vsyscall]' ||
/^[0-9a-f]+-[0-9a-f]+$/.test(arg)) {
return '';
}
diff --git a/lib/punycode.js b/lib/punycode.js
index ea61fd0d39..67905e3d76 100644
--- a/lib/punycode.js
+++ b/lib/punycode.js
@@ -342,7 +342,7 @@ const encode = function(input) {
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
- if (currentValue == n) {
+ if (currentValue === n) {
// Represent delta as a generalized variable-length integer.
let q = delta;
for (let k = base; /* no condition */; k += base) {
@@ -359,7 +359,7 @@ const encode = function(input) {
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0;
++handledCPCount;
}