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) {
|
function copyObject(source) {
|
||||||
var target = {};
|
const target = {};
|
||||||
for (var key in source)
|
for (const key in source)
|
||||||
target[key] = source[key];
|
target[key] = source[key];
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDirents(path, [names, types], callback) {
|
function getDirents(path, [names, types], callback) {
|
||||||
var i;
|
let i;
|
||||||
if (typeof callback == 'function') {
|
if (typeof callback === 'function') {
|
||||||
const len = names.length;
|
const len = names.length;
|
||||||
let toFinish = 0;
|
let toFinish = 0;
|
||||||
callback = once(callback);
|
callback = once(callback);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user