Skip to content

Commit

Permalink
lib: use strict equality comparison
Browse files Browse the repository at this point in the history
Change '==' to '===' in v8_prof_polyfill.js, punycode.js.

PR-URL: #30898
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
PW486 authored and MylesBorins committed Dec 17, 2019

Unverified

The email in this signature doesn’t match the committer email.
1 parent 4f3eca5 commit 2430dd8
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/internal/v8_prof_polyfill.js
Original file line number Diff line number Diff line change
@@ -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 '';
}
4 changes: 2 additions & 2 deletions lib/punycode.js
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 2430dd8

Please sign in to comment.