Skip to content

Commit a7f4d5e

Browse files
ZYSzystargos
authored andcommitted
lib: refactor variable declarations
PR-URL: #22643 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
1 parent dcce2d6 commit a7f4d5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/internal/fs/utils.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ for (const name of Reflect.ownKeys(Dirent.prototype)) {
113113
}
114114

115115
function copyObject(source) {
116-
var target = {};
117-
for (var key in source)
116+
const target = {};
117+
for (const key in source)
118118
target[key] = source[key];
119119
return target;
120120
}
121121

122122
function getDirents(path, [names, types], callback) {
123-
var i;
124-
if (typeof callback == 'function') {
123+
let i;
124+
if (typeof callback === 'function') {
125125
const len = names.length;
126126
let toFinish = 0;
127127
callback = once(callback);

0 commit comments

Comments
 (0)