Skip to content

Commit 7f639d3

Browse files
fix: resolve ESLint errors by replacing new Array()
PR-URL: #6033 Closes: #6032 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]>
1 parent 09d4050 commit 7f639d3

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ function toArray( obj ) {
4040
var out;
4141
var i;
4242
keys = objectKeys( obj );
43-
out = new Array( keys.length );
43+
out = [];
4444
for ( i = 0; i < keys.length; i++ ) {
45-
out[ i ] = obj[ keys[i] ];
45+
out.push( obj[ keys[ i ] ] );
4646
}
4747
return out;
4848
}
@@ -78,9 +78,9 @@ function pipeline( opts, clbk ) {
7878
if ( error ) {
7979
return done( error );
8080
}
81-
usernames = new Array( data.length );
81+
usernames = [];
8282
for ( i = 0; i < data.length; i++ ) {
83-
usernames[ i ] = data[ i ].login;
83+
usernames.push( data[ i ].login );
8484
}
8585
options = {
8686
'useragent': opts.useragent,

0 commit comments

Comments
 (0)