File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/utils/async/function-sequence/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ function funseqAsync() {
7676 if ( nFuncs < 2 ) {
7777 throw new Error ( 'insufficient arguments. Must provide multiple functions to execute sequentially.' ) ;
7878 }
79- f = new Array ( nFuncs ) ;
79+ f = [ ] ;
8080 for ( i = 0 ; i < nFuncs ; i ++ ) {
81- f [ i ] = arguments [ i ] ;
81+ f . push ( arguments [ i ] ) ;
8282 if ( ! isFunction ( f [ i ] ) ) {
8383 throw new TypeError ( format ( 'invalid argument. All arguments must be functions. Value: `%s`.' , f [ i ] ) ) ;
8484 }
@@ -101,9 +101,9 @@ function funseqAsync() {
101101 done = arguments [ arguments . length - 1 ] ;
102102
103103 // Copy arguments which should be provided to the first invoked function...
104- args = new Array ( arguments . length - 1 ) ;
105- for ( i = 0 ; i < args . length ; i ++ ) {
106- args [ i ] = arguments [ i ] ;
104+ args = [ ] ;
105+ for ( i = 0 ; i < arguments . length - 1 ; i ++ ) {
106+ args . push ( arguments [ i ] ) ;
107107 }
108108 // Append the callback an invoked function should call upon completion:
109109 args . push ( next ) ;
You can’t perform that action at this time.
0 commit comments