Skip to content

Commit b545b91

Browse files
19shubham11addaleax
authored andcommitted
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>
1 parent 5120926 commit b545b91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/internal/process/warning.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function onWarning(warning) {
5858
if (isDeprecation && process.noDeprecation) return;
5959
const trace = process.traceProcessWarnings ||
6060
(isDeprecation && process.traceDeprecation);
61-
var msg = `(${process.release.name}:${process.pid}) `;
61+
let msg = `(${process.release.name}:${process.pid}) `;
6262
if (warning.code)
6363
msg += `[${warning.code}] `;
6464
if (trace && warning.stack) {

lib/internal/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function emitExperimentalWarning(feature) {
166166

167167
function filterDuplicateStrings(items, low) {
168168
const map = new Map();
169-
for (var i = 0; i < items.length; i++) {
169+
for (let i = 0; i < items.length; i++) {
170170
const item = items[i];
171171
const key = item.toLowerCase();
172172
if (low) {
@@ -281,7 +281,7 @@ function promisify(original) {
281281
}
282282
if (argumentNames !== undefined && values.length > 1) {
283283
const obj = {};
284-
for (var i = 0; i < argumentNames.length; i++)
284+
for (let i = 0; i < argumentNames.length; i++)
285285
obj[argumentNames[i]] = values[i];
286286
resolve(obj);
287287
} else {

0 commit comments

Comments
 (0)