From 7b2217b3414f54eaea4e898abe29f6a6e76a8ece Mon Sep 17 00:00:00 2001 From: Mandeep2333 Date: Wed, 25 Mar 2026 11:04:00 +0530 Subject: [PATCH] replace new Array() with literal --- .../@stdlib/utils/async/function-sequence/lib/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/async/function-sequence/lib/main.js b/lib/node_modules/@stdlib/utils/async/function-sequence/lib/main.js index 28704adc2248..40d4489f6783 100644 --- a/lib/node_modules/@stdlib/utils/async/function-sequence/lib/main.js +++ b/lib/node_modules/@stdlib/utils/async/function-sequence/lib/main.js @@ -76,9 +76,9 @@ function funseqAsync() { if ( nFuncs < 2 ) { throw new Error( 'insufficient arguments. Must provide multiple functions to execute sequentially.' ); } - f = new Array( nFuncs ); + f = []; for ( i = 0; i < nFuncs; i++ ) { - f[ i ] = arguments[ i ]; + f.push( arguments[ i ] ); if ( !isFunction( f[ i ] ) ) { throw new TypeError( format( 'invalid argument. All arguments must be functions. Value: `%s`.', f[ i ] ) ); } @@ -101,9 +101,9 @@ function funseqAsync() { done = arguments[ arguments.length-1 ]; // Copy arguments which should be provided to the first invoked function... - args = new Array( arguments.length-1 ); - for ( i = 0; i < args.length; i++ ) { - args[ i ] = arguments[ i ]; + args = []; + for ( i = 0; i < arguments.length - 1; i++ ) { + args.push( arguments[ i ] ); } // Append the callback an invoked function should call upon completion: args.push( next );