Skip to content

Commit 90b97a1

Browse files
fix: resolve ESLint errors by replacing new Array()
1 parent db9696d commit 90b97a1

File tree

1 file changed

+4
-2
lines changed
  • lib/node_modules/@stdlib/_tools/github/rank-followers/lib

1 file changed

+4
-2
lines changed

lib/node_modules/@stdlib/_tools/github/rank-followers/lib/pipeline.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ function toArray( obj ) {
4040
var out;
4141
var i;
4242
keys = objectKeys( obj );
43-
out = new Array( keys.length );
43+
out = [];
44+
out.length = keys.length;
4445
for ( i = 0; i < keys.length; i++ ) {
4546
out[ i ] = obj[ keys[i] ];
4647
}
@@ -78,7 +79,8 @@ function pipeline( opts, clbk ) {
7879
if ( error ) {
7980
return done( error );
8081
}
81-
usernames = new Array( data.length );
82+
usernames = [];
83+
usernames.length = data.length;
8284
for ( i = 0; i < data.length; i++ ) {
8385
usernames[ i ] = data[ i ].login;
8486
}

0 commit comments

Comments
 (0)