Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/internal: Use let instead of var for util.js and process/warning.js #30375

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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) {
Expand Down Expand Up @@ -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 {
Expand Down