Skip to content
Permalink
Browse files

lib: use let instead of var

this commit uses let instead of var for util.js & warning.js
PR-URL: #30375
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
19shubham11 authored and MylesBorins committed Nov 12, 2019
1 parent d951209 commit d138e2db539973eb249f06228863184972f6b2df
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/internal/process/warning.js
  2. +2 −2 lib/internal/util.js
@@ -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) {
@@ -166,7 +166,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) {
@@ -281,7 +281,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 {

0 comments on commit d138e2d

Please sign in to comment.
You can’t perform that action at this time.