lib: refactor variable declarations
PR-URL: https://github.com/nodejs/node/pull/22643 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit is contained in:
parent
0623aabbe1
commit
44f7c1df89
@ -113,15 +113,15 @@ for (const name of Reflect.ownKeys(Dirent.prototype)) {
|
||||
}
|
||||
|
||||
function copyObject(source) {
|
||||
var target = {};
|
||||
for (var key in source)
|
||||
const target = {};
|
||||
for (const key in source)
|
||||
target[key] = source[key];
|
||||
return target;
|
||||
}
|
||||
|
||||
function getDirents(path, [names, types], callback) {
|
||||
var i;
|
||||
if (typeof callback == 'function') {
|
||||
let i;
|
||||
if (typeof callback === 'function') {
|
||||
const len = names.length;
|
||||
let toFinish = 0;
|
||||
callback = once(callback);
|
||||
|
Loading…
x
Reference in New Issue
Block a user