Skip to content

Commit

Permalink
lib: use let instead of var
Browse files Browse the repository at this point in the history
this commit uses let instead of var for util.js & warning.js
PR-URL: #30375
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
19shubham11 authored and gireeshpunathil committed Nov 26, 2019
1 parent 03bb272 commit a2dfa3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/internal/process/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function onWarning(warning) {
if (isDeprecation && process.noDeprecation) return;
const trace = process.traceProcessWarnings ||
(isDeprecation && process.traceDeprecation);
var msg = `(${process.release.name}:${process.pid}) `;
let msg = `(${process.release.name}:${process.pid}) `;
if (warning.code)
msg += `[${warning.code}] `;
if (trace && warning.stack) {
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function emitExperimentalWarning(feature) {

function filterDuplicateStrings(items, low) {
const map = new Map();
for (var i = 0; i < items.length; i++) {
for (let i = 0; i < items.length; i++) {
const item = items[i];
const key = item.toLowerCase();
if (low) {
Expand Down Expand Up @@ -290,7 +290,7 @@ function promisify(original) {
}
if (argumentNames !== undefined && values.length > 1) {
const obj = {};
for (var i = 0; i < argumentNames.length; i++)
for (let i = 0; i < argumentNames.length; i++)
obj[argumentNames[i]] = values[i];
resolve(obj);
} else {
Expand Down

0 comments on commit a2dfa3c

Please sign in to comment.