Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b545b91

Browse filesBrowse 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
Copy full SHA for b545b91

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/process/warning.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/warning.js
+1-1Lines changed: 1 addition & 1 deletion
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) {
Collapse file

‎lib/internal/util.js‎

Copy file name to clipboardExpand all lines: lib/internal/util.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.