diff --git a/lib/node_modules/@stdlib/array/base/broadcasted-quinary4d/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/broadcasted-quinary4d/docs/types/test.ts index 93e235b1e6ef..7005a0c510ef 100644 --- a/lib/node_modules/@stdlib/array/base/broadcasted-quinary4d/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/base/broadcasted-quinary4d/docs/types/test.ts @@ -52,12 +52,12 @@ type InOutShapes = [ Array, Array, Array, Array, const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; bquinary4d( [ x, y, z, w, v, out ], shapes, fcn ); // $ExpectType void - bquinary4d( [ x[ 0 ], y, z, w, v, out ], [ [ shapes[ 0 ][ 1 ][ 2 ][ 3 ] ], shapes[ 1 ], shapes[ 2 ], shapes [ 3 ], shapes[ 4 ], shapes[ 5 ] ] , fcn ); // $ExpectType void + bquinary4d( [ x[ 0 ], y, z, w, v, out ], [ [ shapes[ 0 ][ 1 ][ 2 ][ 3 ] ], shapes[ 1 ], shapes[ 2 ], shapes [ 3 ], shapes[ 4 ], shapes[ 5 ] ], fcn ); // $ExpectType void } // The compiler throws an error if the function is provided a first argument which is not an array of nested arrays... { - const shapes: InOutShapes = [ [ 2, 2, 2, 2 ] , [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; + const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; bquinary4d( 'abc', shapes, fcn ); // $ExpectError bquinary4d( 3.14, shapes, fcn ); // $ExpectError @@ -97,7 +97,7 @@ type InOutShapes = [ Array, Array, Array, Array, const v = [ [ [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ] ]; const out = [ [ [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] ] ]; - const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2 ,2 ] ]; + const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; bquinary4d( [ x, y, z, w, v, out ], shapes, 'abc' ); // $ExpectError bquinary4d( [ x, y, z, w, v, out ], shapes, 3.14 ); // $ExpectError @@ -117,7 +117,7 @@ type InOutShapes = [ Array, Array, Array, Array, const v = [ [ [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ] ]; const out = [ [ [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ] ] ]; - const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2 ,2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; + const shapes: InOutShapes = [ [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ], [ 2, 2, 2, 2 ] ]; bquinary4d(); // $ExpectError bquinary4d( [ x, y, z, w, v, out ] ); // $ExpectError diff --git a/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts index 111627b39c07..da525db65c23 100644 --- a/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/string/base/docs/types/index.d.ts @@ -1006,11 +1006,11 @@ interface Namespace { * // returns 'Hello World!' * * @example - * var out = ns.replaceAfter( 'beep boop', ' ', 'foo' , 5 ); + * var out = ns.replaceAfter( 'beep boop', ' ', 'foo', 5 ); * // returns 'beep boop' * * @example - * var out = ns.replaceAfter( 'beep boop beep baz', 'beep', 'foo' , 5 ); + * var out = ns.replaceAfter( 'beep boop beep baz', 'beep', 'foo', 5 ); * // returns 'beep boop beepfoo' */ replaceAfter: typeof replaceAfter; diff --git a/lib/node_modules/@stdlib/string/base/replace-after-last/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/replace-after-last/docs/types/test.ts index 5e008fd2d325..c6d5bc94fa33 100644 --- a/lib/node_modules/@stdlib/string/base/replace-after-last/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/replace-after-last/docs/types/test.ts @@ -31,18 +31,18 @@ import replaceAfterLast = require( './index' ); // The compiler throws an error if the function is provided arguments having invalid types... { replaceAfterLast( true, 'd', 'foo', 100 ); // $ExpectError - replaceAfterLast( false, 'd' , 'foo', 100 ); // $ExpectError - replaceAfterLast( 3, 'd' , 'foo', 100 ); // $ExpectError - replaceAfterLast( [], 'd' , 'foo', 100 ); // $ExpectError - replaceAfterLast( {}, 'd' , 'foo', 100 ); // $ExpectError + replaceAfterLast( false, 'd', 'foo', 100 ); // $ExpectError + replaceAfterLast( 3, 'd', 'foo', 100 ); // $ExpectError + replaceAfterLast( [], 'd', 'foo', 100 ); // $ExpectError + replaceAfterLast( {}, 'd', 'foo', 100 ); // $ExpectError replaceAfterLast( ( x: number ): number => x, 'd', 'foo', 100 ); // $ExpectError replaceAfterLast( 'abc', true, 'foo', 10 ); // $ExpectError replaceAfterLast( 'abc', false, 'foo', 10 ); // $ExpectError - replaceAfterLast( 'abc', 5 , 'foo', 10 ); // $ExpectError + replaceAfterLast( 'abc', 5, 'foo', 10 ); // $ExpectError replaceAfterLast( 'abc', [], 'foo', 10 ); // $ExpectError - replaceAfterLast( 'abc', {} , 'foo', 10 ); // $ExpectError - replaceAfterLast( 'abc', ( x: number ): number => x , 'foo', 10 ); // $ExpectError + replaceAfterLast( 'abc', {}, 'foo', 10 ); // $ExpectError + replaceAfterLast( 'abc', ( x: number ): number => x, 'foo', 10 ); // $ExpectError replaceAfterLast( 'abc', 'd', true, 10 ); // $ExpectError replaceAfterLast( 'abc', 'd', false, 10 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/string/base/replace-after/docs/types/index.d.ts b/lib/node_modules/@stdlib/string/base/replace-after/docs/types/index.d.ts index 2e4e4afbf520..89e3b918a6a1 100644 --- a/lib/node_modules/@stdlib/string/base/replace-after/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/string/base/replace-after/docs/types/index.d.ts @@ -49,11 +49,11 @@ * // returns 'Hello World!' * * @example -* var out = replaceAfter( 'beep boop', ' ', 'foo' , 5 ); +* var out = replaceAfter( 'beep boop', ' ', 'foo', 5 ); * // returns 'beep boop' * * @example -* var out = replaceAfter( 'beep boop beep baz', 'beep', 'foo' , 5 ); +* var out = replaceAfter( 'beep boop beep baz', 'beep', 'foo', 5 ); * // returns 'beep boop beepfoo' */ declare function replaceAfter( str: string, search: string, replacement: string, fromIndex: number ): string; diff --git a/lib/node_modules/@stdlib/string/base/replace-after/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/replace-after/docs/types/test.ts index 97a9fd498177..0583631de6d5 100644 --- a/lib/node_modules/@stdlib/string/base/replace-after/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/replace-after/docs/types/test.ts @@ -32,18 +32,18 @@ import replaceAfter = require( './index' ); // The compiler throws an error if the function is provided arguments having invalid types... { replaceAfter( true, 'd', 'foo', 0 ); // $ExpectError - replaceAfter( false, 'd' , 'foo', 0 ); // $ExpectError - replaceAfter( 3, 'd' , 'foo', 0 ); // $ExpectError - replaceAfter( [], 'd' , 'foo', 0 ); // $ExpectError - replaceAfter( {}, 'd' , 'foo', 0 ); // $ExpectError + replaceAfter( false, 'd', 'foo', 0 ); // $ExpectError + replaceAfter( 3, 'd', 'foo', 0 ); // $ExpectError + replaceAfter( [], 'd', 'foo', 0 ); // $ExpectError + replaceAfter( {}, 'd', 'foo', 0 ); // $ExpectError replaceAfter( ( x: number ): number => x, 'd', 'foo', 0 ); // $ExpectError replaceAfter( 'abc', true, 'foo', 0 ); // $ExpectError replaceAfter( 'abc', false, 'foo', 0 ); // $ExpectError - replaceAfter( 'abc', 5 , 'foo', 0 ); // $ExpectError + replaceAfter( 'abc', 5, 'foo', 0 ); // $ExpectError replaceAfter( 'abc', [], 'foo', 0 ); // $ExpectError - replaceAfter( 'abc', {} , 'foo', 0 ); // $ExpectError - replaceAfter( 'abc', ( x: number ): number => x , 'foo', 0 ); // $ExpectError + replaceAfter( 'abc', {}, 'foo', 0 ); // $ExpectError + replaceAfter( 'abc', ( x: number ): number => x, 'foo', 0 ); // $ExpectError replaceAfter( 'abc', 'd', true, 0 ); // $ExpectError replaceAfter( 'abc', 'd', false, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/string/base/replace-before-last/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/replace-before-last/docs/types/test.ts index 4e76a173a622..d3294e21d546 100644 --- a/lib/node_modules/@stdlib/string/base/replace-before-last/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/replace-before-last/docs/types/test.ts @@ -31,18 +31,18 @@ import replaceBeforeLast = require( './index' ); // The compiler throws an error if the function is provided arguments having invalid types... { replaceBeforeLast( true, 'd', 'foo', 100 ); // $ExpectError - replaceBeforeLast( false, 'd' , 'foo', 100 ); // $ExpectError - replaceBeforeLast( 3, 'd' , 'foo', 100 ); // $ExpectError - replaceBeforeLast( [], 'd' , 'foo', 100 ); // $ExpectError - replaceBeforeLast( {}, 'd' , 'foo', 100 ); // $ExpectError + replaceBeforeLast( false, 'd', 'foo', 100 ); // $ExpectError + replaceBeforeLast( 3, 'd', 'foo', 100 ); // $ExpectError + replaceBeforeLast( [], 'd', 'foo', 100 ); // $ExpectError + replaceBeforeLast( {}, 'd', 'foo', 100 ); // $ExpectError replaceBeforeLast( ( x: number ): number => x, 'd', 'foo', 100 ); // $ExpectError replaceBeforeLast( 'abc', true, 'foo', 10 ); // $ExpectError replaceBeforeLast( 'abc', false, 'foo', 10 ); // $ExpectError - replaceBeforeLast( 'abc', 5 , 'foo', 10 ); // $ExpectError + replaceBeforeLast( 'abc', 5, 'foo', 10 ); // $ExpectError replaceBeforeLast( 'abc', [], 'foo', 10 ); // $ExpectError - replaceBeforeLast( 'abc', {} , 'foo', 10 ); // $ExpectError - replaceBeforeLast( 'abc', ( x: number ): number => x , 'foo', 10 ); // $ExpectError + replaceBeforeLast( 'abc', {}, 'foo', 10 ); // $ExpectError + replaceBeforeLast( 'abc', ( x: number ): number => x, 'foo', 10 ); // $ExpectError replaceBeforeLast( 'abc', 'd', true, 10 ); // $ExpectError replaceBeforeLast( 'abc', 'd', false, 10 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/string/base/replace-before/docs/types/test.ts b/lib/node_modules/@stdlib/string/base/replace-before/docs/types/test.ts index e47a4626254b..9a7e8dfe7b1b 100644 --- a/lib/node_modules/@stdlib/string/base/replace-before/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/base/replace-before/docs/types/test.ts @@ -31,18 +31,18 @@ import replaceBefore = require( './index' ); // The compiler throws an error if the function is provided arguments having invalid types... { replaceBefore( true, 'd', 'foo', 0 ); // $ExpectError - replaceBefore( false, 'd' , 'foo', 0 ); // $ExpectError - replaceBefore( 3, 'd' , 'foo', 0 ); // $ExpectError - replaceBefore( [], 'd' , 'foo', 0 ); // $ExpectError - replaceBefore( {}, 'd' , 'foo', 0 ); // $ExpectError + replaceBefore( false, 'd', 'foo', 0 ); // $ExpectError + replaceBefore( 3, 'd', 'foo', 0 ); // $ExpectError + replaceBefore( [], 'd', 'foo', 0 ); // $ExpectError + replaceBefore( {}, 'd', 'foo', 0 ); // $ExpectError replaceBefore( ( x: number ): number => x, 'd', 'foo', 0 ); // $ExpectError replaceBefore( 'abc', true, 'foo', 0 ); // $ExpectError replaceBefore( 'abc', false, 'foo', 0 ); // $ExpectError - replaceBefore( 'abc', 5 , 'foo', 0 ); // $ExpectError + replaceBefore( 'abc', 5, 'foo', 0 ); // $ExpectError replaceBefore( 'abc', [], 'foo', 0 ); // $ExpectError - replaceBefore( 'abc', {} , 'foo', 0 ); // $ExpectError - replaceBefore( 'abc', ( x: number ): number => x , 'foo', 0 ); // $ExpectError + replaceBefore( 'abc', {}, 'foo', 0 ); // $ExpectError + replaceBefore( 'abc', ( x: number ): number => x, 'foo', 0 ); // $ExpectError replaceBefore( 'abc', 'd', true, 0 ); // $ExpectError replaceBefore( 'abc', 'd', false, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/string/replace-before/docs/types/test.ts b/lib/node_modules/@stdlib/string/replace-before/docs/types/test.ts index f935b62d7b0f..7e4375741dcd 100644 --- a/lib/node_modules/@stdlib/string/replace-before/docs/types/test.ts +++ b/lib/node_modules/@stdlib/string/replace-before/docs/types/test.ts @@ -31,18 +31,18 @@ import replaceBefore = require( './index' ); // The compiler throws an error if the function is provided arguments having invalid types... { replaceBefore( true, 'd', 'foo' ); // $ExpectError - replaceBefore( false, 'd' , 'foo' ); // $ExpectError - replaceBefore( 3, 'd' , 'foo' ); // $ExpectError - replaceBefore( [], 'd' , 'foo' ); // $ExpectError - replaceBefore( {}, 'd' , 'foo' ); // $ExpectError + replaceBefore( false, 'd', 'foo' ); // $ExpectError + replaceBefore( 3, 'd', 'foo' ); // $ExpectError + replaceBefore( [], 'd', 'foo' ); // $ExpectError + replaceBefore( {}, 'd', 'foo' ); // $ExpectError replaceBefore( ( x: number ): number => x, 'd', 'foo' ); // $ExpectError replaceBefore( 'abc', true, 'foo' ); // $ExpectError replaceBefore( 'abc', false, 'foo' ); // $ExpectError - replaceBefore( 'abc', 5 , 'foo' ); // $ExpectError + replaceBefore( 'abc', 5, 'foo' ); // $ExpectError replaceBefore( 'abc', [], 'foo' ); // $ExpectError - replaceBefore( 'abc', {} , 'foo' ); // $ExpectError - replaceBefore( 'abc', ( x: number ): number => x , 'foo' ); // $ExpectError + replaceBefore( 'abc', {}, 'foo' ); // $ExpectError + replaceBefore( 'abc', ( x: number ): number => x, 'foo' ); // $ExpectError replaceBefore( 'abc', 'd', true ); // $ExpectError replaceBefore( 'abc', 'd', false ); // $ExpectError diff --git a/lib/node_modules/@stdlib/utils/pop/benchmark/benchmark.js b/lib/node_modules/@stdlib/utils/pop/benchmark/benchmark.js index 82545727789c..fe5a0ea98570 100644 --- a/lib/node_modules/@stdlib/utils/pop/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/utils/pop/benchmark/benchmark.js @@ -35,9 +35,9 @@ bench( format( '%s::array', pkg ), function benchmark( b ) { var i; len = b.iterations; - arr = new Array( len ); + arr = []; for ( i = 0; i < len; i++ ) { - arr[ i ] = i; + arr.push( i ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { @@ -62,9 +62,9 @@ bench( format( '%s::built-in', pkg ), function benchmark( b ) { var i; len = b.iterations; - arr = new Array( len ); + arr = []; for ( i = 0; i < len; i++ ) { - arr[ i ] = i; + arr.push( i ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) {