Skip to content

Commit 3944271

Browse files
authored
refactor: use array literal and push method
Signed-off-by: Athan <[email protected]>
1 parent 4f72e31 commit 3944271

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/node_modules/@stdlib/_tools/pkgs/deps/lib/resolve.sync.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function resolve( entries, builtins ) {
5050
var k;
5151

5252
len = entries.length;
53-
cache = Array.from({ length:len });
53+
cache = [];
5454

5555
opts = {
5656
'walk': true,
@@ -63,10 +63,10 @@ function resolve( entries, builtins ) {
6363
pkg = entries[ i ].pkg;
6464
k = i + 1;
6565

66-
cache[ i ] = {
66+
cache.push({
6767
'pkg': entries[ i ].pkg,
6868
'dir': entries[ i ].dir
69-
};
69+
});
7070
debug( 'Resolving package: %s (%d of %d)...', pkg, k, len );
7171
results = pkgDeps( entries[ i ].entries, opts );
7272
if ( results instanceof Error ) {

0 commit comments

Comments
 (0)