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>
This commit is contained in:
Donggeon Lim 2019-12-11 14:17:27 +00:00 committed by Rich Trott
parent d64c1dc24a
commit 9c460e10d1
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ const os = {
// Filter out vdso and vsyscall entries. // Filter out vdso and vsyscall entries.
const arg = args[args.length - 1]; const arg = args[args.length - 1];
if (arg === '[vdso]' || if (arg === '[vdso]' ||
arg == '[vsyscall]' || arg === '[vsyscall]' ||
/^[0-9a-f]+-[0-9a-f]+$/.test(arg)) { /^[0-9a-f]+-[0-9a-f]+$/.test(arg)) {
return ''; return '';
} }

View File

@ -342,7 +342,7 @@ const encode = function(input) {
if (currentValue < n && ++delta > maxInt) { if (currentValue < n && ++delta > maxInt) {
error('overflow'); error('overflow');
} }
if (currentValue == n) { if (currentValue === n) {
// Represent delta as a generalized variable-length integer. // Represent delta as a generalized variable-length integer.
let q = delta; let q = delta;
for (let k = base; /* no condition */; k += base) { for (let k = base; /* no condition */; k += base) {
@ -359,7 +359,7 @@ const encode = function(input) {
} }
output.push(stringFromCharCode(digitToBasic(q, 0))); output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
delta = 0; delta = 0;
++handledCPCount; ++handledCPCount;
} }