diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/README.md b/lib/node_modules/@stdlib/array/base/cusome-by/README.md
new file mode 100644
index 000000000000..60784e802c8d
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/README.md
@@ -0,0 +1,145 @@
+
+
+# cusomeBy
+
+> Cumulatively test whether at least `n` array elements in a provided array pass a test implemented by a predicate function.
+
+
+
+## Usage
+
+```javascript
+var cusomeBy = require( '@stdlib/array/base/cusome-by' );
+```
+
+#### cusomeBy( x, n, predicate\[, thisArg ] )
+
+Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function.
+
+```javascript
+function fcn( value) {
+ return ( value > 0 );
+}
+
+var x = [ 0, 0, 0, 1, 1 ];
+
+var y = cusomeBy( x, 2, fcn );
+// returns [ false, false, false , false, true ]
+```
+
+The invoked `predicate` function is provided three arguments:
+
+- **value**: collection element.
+- **index**: collection index.
+- **collection**: input collection.
+
+To set the function execution context, provide a `thisArg`.
+
+```javascript
+function fcn( v ) {
+ this.count += 1;
+ return ( v > 0 );
+}
+
+var x = [ 0, 0, 0, 1, 1 ];
+
+var context = {
+ 'count': 0
+};
+
+var bool = cusomeBy( x, 1, fcn, context );
+// returns [ false, false, false, true, true ]
+
+var count = context.count;
+// returns 4
+```
+
+#### cusomeBy.assign( x, n, out, stride, offset, predicate\[, thisArg ] )
+
+Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to a provided output array.
+
+```javascript
+function fcn( v ) {
+ return ( v > 0 );
+}
+
+var x = [ 0, 0, 0, 1, 1 ];
+var y = [ false, null, false, null, false, null, false, null, false, null ];
+
+var out = cusomeBy.assign( x, 2, y, 2, 0, fcn );
+// returns [ false, null, false, null, false, null, false, null, true, null ]
+
+var bool = ( out === y );
+// returns true
+```
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var bernoulli = require( '@stdlib/random/array/bernoulli' );
+var cusomeBy = require( '@stdlib/array/base/cusome-by' );
+
+function fcn( value ) {
+ return ( value > 0 );
+}
+
+// Create an array of random values:
+var x = bernoulli( 10, 0.8 );
+console.log( x );
+
+// Cumulatively test whether at least three array elements are positive:
+var y = cusomeBy( x, 3, fcn );
+console.log( y );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.assign.length.js b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.assign.length.js
new file mode 100644
index 000000000000..f69c802a58f8
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.assign.length.js
@@ -0,0 +1,99 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var isArray = require( '@stdlib/assert/is-array' );
+var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
+var filled = require( '@stdlib/array/base/filled' );
+var pkg = require( './../package.json' ).name;
+var cusomeBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = filled( 1.5, len );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var y;
+ var v;
+ var i;
+
+ y = filled( false, len );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = cusomeBy.assign( x, 2, y, 1, 0, isPositiveInteger );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an array' );
+ }
+ }
+ b.toc();
+ if ( !isArray( v ) ) {
+ b.fail( 'should return an array' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':assign:len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.js
new file mode 100644
index 000000000000..745230c884f3
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.js
@@ -0,0 +1,53 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isArray = require( '@stdlib/assert/is-array' );
+var zeroTo = require( '@stdlib/array/base/zero-to' );
+var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' ).isPrimitive;
+var pkg = require( './../package.json' ).name;
+var cusomeBy = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg+'::copy:len=100', function benchmark( b ) {
+ var x;
+ var i;
+ var v;
+
+ x = zeroTo( 100 );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = cusomeBy( x, 50, isPositiveInteger );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an array' );
+ }
+ }
+ b.toc();
+ if ( !isArray( v ) ) {
+ b.fail( 'should return an array' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.length.js
new file mode 100644
index 000000000000..4ea48252860f
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/benchmark/benchmark.length.js
@@ -0,0 +1,96 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var isArray = require( '@stdlib/assert/is-array' );
+var isPositiveInteger = require( '@stdlib/assert/is-positive-integer' );
+var filled = require( '@stdlib/array/base/filled' );
+var pkg = require( './../package.json' ).name;
+var cusomeBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var x = filled( 1.5, len );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var v;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = cusomeBy( x, 2, isPositiveInteger );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an array' );
+ }
+ }
+ b.toc();
+ if ( !isArray( v ) ) {
+ b.fail( 'should return an array' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/docs/repl.txt b/lib/node_modules/@stdlib/array/base/cusome-by/docs/repl.txt
new file mode 100644
index 000000000000..6d723e8c6b60
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/docs/repl.txt
@@ -0,0 +1,83 @@
+
+{{alias}}( x, n, predicate[, thisArg] )
+ Cumulatively tests whether at least n array elements in a provided array
+ pass a test implemented by a predicate function.
+
+ The predicate function is provided three arguments:
+
+ - value: current array element.
+ - index: current array element index.
+ - arr: the input array.
+
+ Parameters
+ ----------
+ x: ArrayLikeObject
+ Input array.
+
+ n: integer
+ Number of elements.
+
+ predicate: Function
+ Predicate function.
+
+ thisArg: any (optional)
+ Execution context.
+
+ Returns
+ -------
+ out: Array
+ Output array.
+
+ Examples
+ --------
+ > function fcn( v ) { return ( v > 0 ); };
+ > var x = [ 0, 0, 0, 1, 1 ];
+ > var y = {{alias}}( x, 2, fcn )
+ [ false, false, false, false, true ]
+
+
+{{alias}}.assign( x, n, out, stride, offset, predicate[, thisArg] )
+ Cumulatively tests whether at least n elements in a provided array pass a
+ test implemented by a predicate function and assigns the values to elements
+ in a provided output array.
+
+ Parameters
+ ----------
+ x: ArrayLikeObject
+ Input array.
+
+ n: Integer
+ Number of Elements.
+
+ out: ArrayLikeObject
+ Output array.
+
+ stride: integer
+ Output array stride.
+
+ offset: integer
+ Output array offset.
+
+ predicate: Function
+ Predicate function.
+
+ thisArg: any (optional)
+ Execution context.
+
+ Returns
+ -------
+ out: ArrayLikeObject
+ Output array.
+
+ Examples
+ --------
+ > function fcn( v ) { return ( v > 0 ); };
+ > var x = [ 0, 0, 1, 1 ];
+ > var out = [ false, null, false, null, false, null, false, null ];
+ > var arr = {{alias}}.assign( x, 2, out, 2, 0, fcn )
+ [ false, null, false, null, false, null, true, null ];
+ > var bool = ( arr === out )
+ true
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/index.d.ts
new file mode 100644
index 000000000000..2a54cb49177b
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/index.d.ts
@@ -0,0 +1,204 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Collection, AccessorArrayLike, TypedArray, BooleanArray } from '@stdlib/types/array';
+
+/**
+* Checks whether an element in a collection passes a test.
+*
+* @returns boolean indicating whether an element in a collection passes a test
+*/
+type Nullary = ( this: U ) => boolean;
+
+/**
+* Checks whether an element in a collection passes a test.
+*
+* @param value - collection value
+* @returns boolean indicating whether an element in a collection passes a test
+*/
+type Unary = ( this: U, value: T ) => boolean;
+
+/**
+* Checks whether an element in a collection passes a test.
+*
+* @param value - collection value
+* @param index - collection index
+* @returns boolean indicating whether an element in a collection passes a test
+*/
+type Binary = ( this: U, value: T, index: number ) => boolean;
+
+/**
+* Checks whether an element in a collection passes a test.
+*
+* @param value - collection value
+* @param index - collection index
+* @param collection - input collection
+* @returns boolean indicating whether an element in a collection passes a test
+*/
+type Ternary = ( this: U, value: T, index: number, collection: Collection ) => boolean;
+
+/**
+* Checks whether an element in a collection passes a test.
+*
+* @param value - collection value
+* @param index - collection index
+* @param collection - input collection
+* @returns boolean indicating whether an element in a collection passes a test
+*/
+type Predicate = Nullary | Unary | Binary | Ternary;
+
+/**
+* Interface describing `cusomeBy`.
+*/
+interface CuSomeBy {
+ /**
+ * Cumulatively tests whether at least `n` array elements in a provided array passes a test implemented by a predicate function.
+ *
+ * @param x - input array
+ * @param n - number of elements
+ * @param predicate - test function
+ * @param thisArg - execution context
+ * @returns output array
+ *
+ * @example
+ * function isPositive( v ) {
+ * return ( v > 0 );
+ * }
+ * var x = [ 0, 0, 0, 1, 1 ];
+ *
+ * var y = cusomeBy( x, 2, isPositive );
+ * // returns [ false, false, false, false, true ];
+ */
+ ( x: Collection | AccessorArrayLike, n: number, predicate: Predicate, thisArg?: ThisParameterType> ): Array;
+
+ /**
+ * Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to the provided output array.
+ *
+ * @param x - input array
+ * @param n - number of elements
+ * @param y - output array
+ * @param stride - output array stride
+ * @param offset - output array offset
+ * @param predicate - test function
+ * @param thisArg - execution context
+ * @returns output array
+ *
+ * @example
+ * function isPositive( v ) {
+ * return ( v > 0 );
+ * }
+ * var x = [ 0, 0, 0, 1, 1,];
+ * var y = [ false, null, false, null, false, null, false, null, false, null ];
+ *
+ * var arr = cusomeBy.assign( x, 2, y, 2, 0, isPositive );,
+ * // returns [ false, null, false, null, false, null, false, null, true, null ];
+ */
+ assign( x: Collection | AccessorArrayLike, n: number, out: Array, stride: number, offset: number, predicate: Predicate, thisArg?: ThisParameterType> ): Array;
+
+ /**
+ * Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to the provided output array.
+ *
+ * @param x - input array
+ * @param n - number of elements
+ * @param out - output array
+ * @param stride - output array stride
+ * @param offset - output array offset
+ * @param predicate - test function
+ * @param thisArg - execution context
+ * @returns output array
+ *
+ * @example
+ * var BooleanArray = require( '@stdlib/array/bool' );
+ *
+ * function isPositive( v ) {
+ * return ( v > 0 );
+ * }
+ * var x = [ 0, 0, 0, 1, 1 ];
+ * var y = new BooleanArray( [ false, false, false, false, false, false, false, false, false, false ] );
+ *
+ * var arr = cusomeBy.assign( x, 2, y, 2, 0, isPositive );
+ * // returns
+ *
+ * var v = arr.get( 8 );
+ * // returns true
+ */
+ assign( x: Collection | AccessorArrayLike, n: number, out: U, stride: number, offset: number, predicate: Predicate, thisArg?: ThisParameterType> ): U;
+
+ /**
+ * Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to the provided output array.
+ *
+ * @param x - input array
+ * @param n - number of elements
+ * @param y - output array
+ * @param stride - output array stride
+ * @param offset - output array offset
+ * @param predicate - test function
+ * @param thisArg - execution context
+ * @returns output array
+ *
+ * @example
+ * function isPositive( v ) {
+ * return ( v > 0 );
+ * }
+ * var x = [ 0, 0, 0, 1, 1 ];
+ * var y = [ false, null, false, null, false, null, false, null, false, null ];
+ *
+ * var arr = cusomeBy.assign( x, 2, y, 2, 0, isPositive );
+ * // returns [ false, null, false, null, false, null, false, null, true, null ];
+ */
+ assign( x: Collection | AccessorArrayLike, n: number, out: Collection | AccessorArrayLike, stride: number, offset: number, predicate: Predicate, thisArg?: ThisParameterType> ): Collection | AccessorArrayLike;
+}
+
+/**
+* Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function.
+*
+* @param x - input array
+* @param n - number of elements
+* @param predicate - test function
+* @param thisArg - execution context
+* @returns output array
+*
+* @example
+* function isPositive( v ) {
+* return ( v > 0 );
+* }
+* var x = [ 0, 0, 0, 1, 1 ];
+*
+* var result = cusomeBy( x, 2, isPositive );
+* // returns [ false, false, false, false, true ]
+*
+* @example
+* function isPositive( v ) {
+* return ( v > 0 );
+* }
+* var x = [ 0, 0, 0, 1, 1 ];
+* var y = [ false, null, false, null, false, null, false, null, false, null ];
+*
+* var arr = cusomeBy.assign( x, 2, y, 2, 0, isPositive );
+* //returns [ false, null, false, null, false, null, false, null, true, null ];
+*/
+declare var cusomeBy: CuSomeBy;
+
+
+// EXPORTS //
+
+export = cusomeBy;
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/test.ts
new file mode 100644
index 000000000000..0320b68d02e7
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/docs/types/test.ts
@@ -0,0 +1,234 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import cusomeBy = require( './index' );
+
+const isPositive = ( v: number ): boolean => {
+ return ( v > 0 );
+};
+
+
+// TESTS //
+
+// The function returns an array...
+{
+ cusomeBy( [ 1, 2, 3, 4 ], 2, isPositive ); // $ExpectType boolean[]
+ cusomeBy( [ 1, 2, 3, 4 ], 2, isPositive ); // $ExpectType boolean[]
+
+ cusomeBy( [ 1, 2, 3, 4 ], 2, isPositive, {} ); // $ExpectType boolean[]
+ cusomeBy( [ 1, 2, 3, 4 ], 2, isPositive, {} ); // $ExpectType boolean[]
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an array-like object...
+{
+ cusomeBy( 1, 2, isPositive ); // $ExpectError
+ cusomeBy( true, 2, isPositive ); // $ExpectError
+ cusomeBy( false, 2, isPositive ); // $ExpectError
+ cusomeBy( null, 2, isPositive ); // $ExpectError
+ cusomeBy( void 0, 2, isPositive ); // $ExpectError
+ cusomeBy( {}, 2, isPositive ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is a number...
+{
+ cusomeBy( [], true, isPositive ); // $ExpectError
+ cusomeBy( [], false, isPositive ); // $ExpectError
+ cusomeBy( [], null, isPositive ); // $ExpectError
+ cusomeBy( [], void 0, isPositive ); // $ExpectError
+ cusomeBy( [], {}, isPositive ); // $ExpectError
+ cusomeBy( [], undefined, isPositive ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not an array-like object containing numbers...
+{
+ cusomeBy( [], 2, 1 ); // $ExpectError
+ cusomeBy( [], 2, true ); // $ExpectError
+ cusomeBy( [], 2, false ); // $ExpectError
+ cusomeBy( [], 2, null ); // $ExpectError
+ cusomeBy( [], 2, void 0 ); // $ExpectError
+ cusomeBy( [], 2, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ cusomeBy(); // $ExpectError
+ cusomeBy( [] ); // $ExpectError
+ cusomeBy( [], 2, 'throw', {} , null ); // $ExpectError
+}
+
+// Attached to the main export is an `assign` method which returns a collection...
+{
+ const x = [ 1, 2, 3, 4 ];
+
+ cusomeBy.assign( x, 2, [ 0, 0, 0, 0 ], 1, 0, isPositive ); // $ExpectType (number | boolean)[]
+ cusomeBy.assign( x, 2, new Float64Array( 4 ), 1, 0, isPositive ); // $ExpectType Float64Array
+ cusomeBy.assign( x, 2, new Float32Array( 4 ), 1, 0, isPositive ); // $ExpectType Float32Array
+ cusomeBy.assign( x, 2, new Int32Array( 4 ), 1, 0, isPositive ); // $ExpectType Int32Array
+ cusomeBy.assign( x, 2, new Int16Array( 4 ), 1, 0, isPositive ); // $ExpectType Int16Array
+ cusomeBy.assign( x, 2, new Int8Array( 4 ), 1, 0, isPositive ); // $ExpectType Int8Array
+ cusomeBy.assign( x, 2, new Uint32Array( 4 ), 1, 0, isPositive ); // $ExpectType Uint32Array
+ cusomeBy.assign( x, 2, new Uint16Array( 4 ), 1, 0, isPositive ); // $ExpectType Uint16Array
+ cusomeBy.assign( x, 2, new Uint8Array( 4 ), 1, 0, isPositive ); // $ExpectType Uint8Array
+ cusomeBy.assign( x, 2, new Uint8ClampedArray( 4 ), 1, 0, isPositive ); // $ExpectType Uint8ClampedArray
+
+ cusomeBy.assign( x, 2, [ 0, 0, 0, 0 ], 1, 0, isPositive, {} ); // $ExpectType (number | boolean)[]
+ cusomeBy.assign( x, 2, new Float64Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Float64Array
+ cusomeBy.assign( x, 2, new Float32Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Float32Array
+ cusomeBy.assign( x, 2, new Int32Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Int32Array
+ cusomeBy.assign( x, 2, new Int16Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Int16Array
+ cusomeBy.assign( x, 2, new Int8Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Int8Array
+ cusomeBy.assign( x, 2, new Uint32Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Uint32Array
+ cusomeBy.assign( x, 2, new Uint16Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Uint16Array
+ cusomeBy.assign( x, 2, new Uint8Array( 4 ), 1, 0, isPositive, {} ); // $ExpectType Uint8Array
+ cusomeBy.assign( x, 2, new Uint8ClampedArray( 4 ), 1, 0, isPositive, {} ); // $ExpectType Uint8ClampedArray
+}
+
+// The compiler throws an error if the `assign` method is provided a first argument which is not an array-like object...
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+
+ cusomeBy.assign( 1, 2, x, 2, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( true, 2, x, 2, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( false, 2, x, 2, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( null, 2, x, 2, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( void 0, 2, x, 2, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( {}, 2, x, 2, 0, isPositive ); // $ExpectError
+
+ cusomeBy.assign( 1, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( true, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( false, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( null, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( void 0, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( {}, 2, x, 2, 0, isPositive, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a second argument which is not a number..
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+
+ cusomeBy.assign( x, [], x, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, true, x, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, false, x, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, null, x, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, void 0, x, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, {}, x, 1, 0, isPositive ); // $ExpectError
+
+ cusomeBy.assign( x, [], x, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, true, x, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, false, x, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, null, x, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, void 0, x, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, {}, x, 1, 0, isPositive, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a third argument which is not an array-like object containing numbers...
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+
+ cusomeBy.assign( x, 2, 1, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, true, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, false, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, null, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, void 0, 1, 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, {}, 1, 0, isPositive ); // $ExpectError
+
+ cusomeBy.assign( x, 2, 1, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, true, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, false, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, null, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, void 0, 1, 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, {}, 1, 0, isPositive, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a fourth argument which is not a valid index...
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+ const y = [ false, null, false, null, false, null, false, null, false, null ];
+
+ cusomeBy.assign( x, 2, y, '1', 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, true, 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, false, 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, null, 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, void 0, 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, {}, 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, [], 1, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, ( x: number ): number => x, 1, isPositive ); // $ExpectError
+
+ cusomeBy.assign( x, 2, y, '1', 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, true, 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, false, 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, null, 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, void 0, 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, {}, 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, [], 1, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, ( x: number ): number => x, 1, isPositive, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a fifth argument which is not a number...
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+ const y = [ false, null, false, null, false, null, false, null, false, null ];
+
+ cusomeBy.assign( x, 2, y, 0, '1', isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, true, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, false, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, null, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, void 0, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, {}, isPositive ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, [], isPositive ); // $ExpectError
+
+ cusomeBy.assign( x, 2, y, 0, '1', isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, true, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, false, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, null, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, void 0, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, {}, isPositive, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, [], isPositive, {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided a sixth argument which is not a function...
+{
+ const x = [ 1, 1, 0, 0, 0 ];
+ const y = [ false, null, false, null, false, null, false, null, false, null ];
+
+ cusomeBy.assign( x, 2, y, 0, 1, '1' ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, true ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, false ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, null ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, void 0 ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, [] ); // $ExpectError
+
+ cusomeBy.assign( x, 2, y, 0, 1, '1', {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, true, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, false, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, null, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, void 0, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, {}, {} ); // $ExpectError
+ cusomeBy.assign( x, 2, y, 0, 1, [], {} ); // $ExpectError
+}
+
+// The compiler throws an error if the `assign` method is provided an unsupported number of arguments...
+{
+ cusomeBy.assign(); // $ExpectError
+ cusomeBy.assign( [] ); // $ExpectError
+ cusomeBy.assign( [], [] ); // $ExpectError
+ cusomeBy.assign( [], [], 'throw' ); // $ExpectError
+ cusomeBy.assign( [], [], 'throw', [] ); // $ExpectError
+ cusomeBy.assign( [], [], [], 'throw', [], 1, 0, {} ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/examples/index.js b/lib/node_modules/@stdlib/array/base/cusome-by/examples/index.js
new file mode 100644
index 000000000000..08f06cd8a6c7
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/examples/index.js
@@ -0,0 +1,34 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var bernoulli = require( '@stdlib/random/array/bernoulli' );
+var cusomeBy = require( './../lib' );
+
+function fcn( value ) {
+ return ( value > 0 );
+}
+
+// Generate an array of random values:
+var x = bernoulli( 10, 0.8 );
+console.log( x );
+
+// Cumulatively test whether at least three array elements are positive:
+var y = cusomeBy( x, 3, fcn );
+console.log( y );
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/lib/assign.js b/lib/node_modules/@stdlib/array/base/cusome-by/lib/assign.js
new file mode 100644
index 000000000000..ca86d3800224
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/lib/assign.js
@@ -0,0 +1,178 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
+
+
+// FUNCTIONS //
+
+/**
+* Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to elements in the provided output array.
+*
+* @private
+* @param {Collection} x - input array
+* @param {integer} n - number of elements
+* @param {Collection} out - output array
+* @param {integer} stride - output array stride
+* @param {NonNegativeInteger} offset - output array offset
+* @param {Function} predicate - test function
+* @param {*} thisArg - execution context
+* @returns {Collection} output array
+*
+* @example
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = [ false, false, false, true, true ];
+*
+* var out = [ false, null, false, null, false, null, false, null, false, null ];
+* var arr = indexed( x, 2, out, 2, 0, isPositive );
+* // returns [ false, null, false, null, false, null, false, null, true, null ]
+*/
+function indexed( x, n, out, stride, offset, predicate, thisArg ) {
+ var flg;
+ var io;
+ var i;
+
+ flg = false;
+ io = offset;
+ for ( i = 0; i <= x.length - 1; i++ ) {
+ if ( !flg && predicate.call( thisArg, x[ i ], i, x ) ) {
+ n -= 1;
+ if ( n <= 0 ) {
+ flg = true;
+ }
+ }
+ out[ io ] = flg;
+ io += stride;
+ }
+ return out;
+}
+
+/**
+* Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to elements in the provided output array.
+*
+* @private
+* @param {Object} x - input array object
+* @param {integer} n - number of elements
+* @param {Object} out - output array object
+* @param {integer} stride - output array stride
+* @param {NonNegativeInteger} offset - output array offset
+* @param {Function} predicate - test function
+* @param {*} thisArg - execution context
+* @returns {Collection} output array
+*
+* @example
+* var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+* var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
+*
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = toAccessorArray( [ false, false, false, true, true ] );
+*
+* var out = toAccessorArray( [ false, null, false, null, false, null, false, null, false, null ] );
+* var arr = accessors( arraylike2object( x ), 2, arraylike2object( out ), 2, 0, isPositive );
+*
+* var v = arr.get( 8 );
+* // returns true
+*/
+function accessors( x, n, out, stride, offset, predicate, thisArg ) {
+ var xdata;
+ var odata;
+ var xget;
+ var oset;
+ var flg;
+ var io;
+ var i;
+
+ xdata = x.data;
+ odata = out.data;
+
+ xget = x.accessors[ 0 ];
+ oset = out.accessors[ 1 ];
+
+ io = offset;
+ flg = false;
+ for ( i = 0; i <= xdata.length - 1; i++ ) {
+ if ( !flg && predicate.call( thisArg, xget( xdata, i ), i, xdata ) ) {
+ n -= 1;
+ if ( n <= 0 ) {
+ flg = true;
+ }
+ }
+
+ oset( odata, io, flg );
+ io += stride;
+ }
+ return odata;
+}
+
+
+// MAIN //
+
+/**
+* Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function and assigns the results to elements in the provided output array.
+*
+* @param {Collection} x - input array
+* @param {integer} n - number of elements
+* @param {Collection} out - output array
+* @param {integer} stride - output array stride
+* @param {NonNegativeInteger} offset - output array offset
+* @param {Function} predicate - test function
+* @param {*} [thisArg] - execution context
+* @returns {Collection} output array
+*
+* @example
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = [ false, false, false, true, true ];
+*
+* var out = [ false, null, false, null, false, null, false, null, false, null ];
+* var arr = indexed( x, 2, out, 2, 0, isPositive );
+* // returns [ false, null, false, null, false, null, false, null, true, null ]
+*
+* var bool = ( arr === out );
+* // returns true
+*/
+function assign( x, n, out, stride, offset, predicate, thisArg ) {
+ var xo;
+ var oo;
+
+ xo = arraylike2object( x );
+ oo = arraylike2object( out );
+ if ( xo.accessorProtocol || oo.accessorProtocol ) {
+ accessors( xo, n, oo, stride, offset, predicate, thisArg );
+ return out;
+ }
+ indexed( x, n, out, stride, offset, predicate, thisArg );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = assign;
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/lib/index.js b/lib/node_modules/@stdlib/array/base/cusome-by/lib/index.js
new file mode 100644
index 000000000000..6c5c66261cb9
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/lib/index.js
@@ -0,0 +1,68 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Cumulatively test whether at least `n` array elements in a provided array pass a test implemented by a predicate function.
+*
+* @module @stdlib/array/base/cusome-by
+*
+* @example
+* var cusomeBy = require( '@stdlib/array/base/cusome-by' );
+*
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = [ 0, 0, 0, 1, 1 ];
+* var y = cusomeBy( x, 2, isPositive );
+* // returns [ false, false, false, false, true ]
+*
+* @example
+* var cusomeBy = require( '@stdlib/array/base/cusome-by' );
+*
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = [ 0, 0, 0, 1, 1 ];
+*
+* var y = [ false, null, false, null, false, null, false, null, false, null ];
+* var out = cusomeBy.assign( x, 2, y, 2, 0, isPositive );
+* // returns [ false, null, false, null, false, null, false, null, true, null ];
+*
+* var bool = ( y === out );
+* // returns true
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var assign = require( './assign.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'assign', assign );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/lib/main.js b/lib/node_modules/@stdlib/array/base/cusome-by/lib/main.js
new file mode 100644
index 000000000000..af404b913f04
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/lib/main.js
@@ -0,0 +1,56 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var filled = require( '@stdlib/array/base/filled' );
+var assign = require( './assign.js' );
+
+
+// MAIN //
+
+/**
+* Cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function.
+*
+* @param {Collection} x - input collection
+* @param {integer} n - number of elements
+* @param {Function} predicate - test function
+* @param {*} [thisArg] - execution context
+* @returns {Array} output array
+*
+* @example
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var x = [ 0, 0, 0, 1, 1 ];
+*
+* var y = cusomeBy( x, 2, isPositive );
+* // returns [ false, false, false, false, true ]
+*/
+function cusomeBy( x, n, predicate, thisArg ) {
+ var out = filled( false, x.length );
+ return assign( x, n, out, 1, 0, predicate, thisArg );
+}
+
+
+// EXPORTS //
+
+module.exports = cusomeBy;
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/package.json b/lib/node_modules/@stdlib/array/base/cusome-by/package.json
new file mode 100644
index 000000000000..aec14ef20860
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "@stdlib/array/base/cusome-by",
+ "version": "0.0.0",
+ "description": "Cumulatively test whether at least `n` array elements in a provided array pass a test implemented by a predicate function.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdtypes",
+ "types",
+ "data",
+ "structure",
+ "utils",
+ "generic",
+ "array",
+ "cusome-by",
+ "cumulative",
+ "test",
+ "every",
+ "array.every",
+ "validate"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/test/test.assign.js b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.assign.js
new file mode 100644
index 000000000000..90b11ebad3a9
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.assign.js
@@ -0,0 +1,247 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float64Array = require( '@stdlib/array/float64' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var cusomeBy = require( './../lib/assign.js' );
+
+
+// FUNCTIONS //
+
+function isPositive( v ) {
+ return ( v > 0 );
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof cusomeBy, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function (generic)', function test( t ) {
+ var expected;
+ var actual;
+ var x;
+ var y;
+
+ x = [ 1, 1, 1, 0, 1 ];
+ y = [ false, null, false, null, false, null, false, null, false, null ];
+
+ actual = cusomeBy( x, 3, y, 2, 0, isPositive);
+ expected = [ false, null, false, null, true, null, true, null, true, null ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ 1, 1, 0, 0 ];
+ y = [ false, null, false, null, false, null, false, null ];
+
+ actual = cusomeBy( x, 3, y, 2, 0, isPositive );
+ expected = [ false, null, false, null, false, null, false, null ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ 0, 0, 1, 0, 1 ];
+ y = [ false, false, false, true, true, true ];
+
+ actual = cusomeBy( x, 1, y, 1, 1, isPositive );
+ expected = [ false, false, false, true, true, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [];
+ y = [ false, false, false, false, false ];
+
+ actual = cusomeBy( x, 2, y, 1, 0, isPositive );
+ expected = [ false, false, false, false, false ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ 1 ];
+ y = [ false, false ];
+
+ actual = cusomeBy( x, 1, y, 1, 1, isPositive );
+ expected = [ false, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function (typed)', function test( t ) {
+ var expected;
+ var actual;
+ var x;
+ var y;
+
+ x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
+ y = [ false, true, false, true, false ];
+
+ actual = cusomeBy( x, 3, y, 1, 0, isPositive );
+ expected = [ false, false, true, true, false ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [ 1.0, 1.0, 0.0, 0.0 ] );
+ y = [ false, null, false, null, false, null, false, null ];
+
+ actual = cusomeBy( x, 2, y, 2, 0, isPositive );
+ expected = [ false, null, true, null, true, null, true, null ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [ 0.0, 1.0, 1.0, 0.0, 0.0 ] );
+ y = [ true, false, false, true, true, true ];
+
+ actual = cusomeBy( x, 2, y, 1, 0, isPositive );
+ expected = [ false, false, true, true, true, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [] );
+ y = [ false, false, false, false, false ];
+
+ actual = cusomeBy( x, 1, y, 1, 0, isPositive );
+ expected = [ false, false, false, false, false ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [ 1.0 ] );
+ y = [ false, false ];
+
+ actual = cusomeBy( x, 3, y, 1, 1, isPositive );
+ expected = [ false, false ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` array elements in a provided array pass a test implemented by a predicate function (accessor)', function test( t ) {
+ var expected;
+ var actual;
+ var ybuf;
+ var x;
+ var y;
+
+ x = toAccessorArray( [ 1, 0, 0, 0, 1 ] );
+ ybuf = [ false, true, false, true, false ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 2, y, 1, 0, isPositive );
+ expected = [ false, false, false, false, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 0, 1, 1, 0 ] );
+ ybuf = [ false, null, false, null, false, null, false, null ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 1, y, 2, 0, isPositive );
+ expected = [ false, null, true, null, true, null, true, null ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 1, 1, 1, 0, 0 ] );
+ ybuf = [ true, false, false, false, false, false ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 2, y, 1, 1, isPositive );
+ expected = [ true, false, true, true, true, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 1, 0, 0, 0, 1 ] );
+ ybuf = [ false, false, false, false, false ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 2, y, 1, 0, isPositive );
+ expected = [ false, false, false, false, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ x = toAccessorArray( [] );
+ ybuf = [ false, false, false, false, false ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 0, y, 1, 0, isPositive );
+ expected = [ false, false, false, false, false ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 1 ] );
+ ybuf = [ false, false ];
+ y = toAccessorArray( ybuf );
+
+ actual = cusomeBy( x, 1, y, 1, 1, isPositive );
+ expected = [ false, true ];
+
+ t.strictEqual( actual, y, 'returns expected value' );
+ t.deepEqual( ybuf, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports providing an execution context', function test( t ) {
+ var expected;
+ var actual;
+ var ctx;
+ var x;
+ var y;
+
+ ctx = {
+ 'count': 0
+ };
+
+ x = [ 1, 1, 1, 0, 1 ];
+ y = [ false, null, false, null, false, null, false, null, false, null ];
+
+ actual = cusomeBy( x, 3, y, 2, 0, predicate, ctx);
+ expected = [ false, null, false, null, true, null, true, null, true, null ];
+
+ t.deepEqual( actual, expected, 'returns expected value' );
+ t.strictEqual( ctx.count, 3, 'returns expected value' );
+ t.end();
+
+ function predicate( v ) {
+ this.count += 1; // eslint-disable-line no-invalid-this
+ return ( v > 0 );
+ }
+});
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/test/test.js b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.js
new file mode 100644
index 000000000000..ae402bfb8f69
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.js
@@ -0,0 +1,41 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var hasOwnProp = require( '@stdlib/assert/has-own-property' );
+var hasMethod = require( '@stdlib/assert/is-method' );
+var cusomeBy = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof cusomeBy, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is an `assign` method', function test( t ) {
+ t.strictEqual( hasOwnProp( cusomeBy, 'assign' ), true, 'returns expected value' );
+ t.strictEqual( hasMethod( cusomeBy, 'assign' ), true, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/array/base/cusome-by/test/test.main.js b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.main.js
new file mode 100644
index 000000000000..c418d279da0a
--- /dev/null
+++ b/lib/node_modules/@stdlib/array/base/cusome-by/test/test.main.js
@@ -0,0 +1,158 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );
+var Float64Array = require( '@stdlib/array/float64' );
+var cusomeBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+function isPositive( v ) {
+ return ( v > 0 );
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual(typeof cusomeBy, 'function', 'main export is a function');
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function (generic)', function test( t ) {
+ var expected;
+ var actual;
+ var x;
+
+ x = [ 0, 0, 0, 1, 1 ];
+
+ actual = cusomeBy( x, 2, isPositive );
+ expected = [ false, false, false, false, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ 0.0, 0.0, 0.0, 1.0, 1.0 ];
+ actual = cusomeBy( x, 1, isPositive );
+ expected = [ false, false, false, true, true];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ true, true, true, true, true ];
+ actual = cusomeBy( x, 3, isPositive );
+ expected = [ false, false, true, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = [ 1, null, 1 ];
+ actual = cusomeBy( x, 2, isPositive );
+ expected = [ false, false, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function (typed)', function test( t ) {
+ var expected;
+ var actual;
+ var x;
+
+ x = new Float64Array( [ 1.0, 1.0, 1.0, 0.0, 1.0 ] );
+ actual = cusomeBy( x, 3, isPositive );
+ expected = [ false, false, true, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+ actual = cusomeBy( x, 2, isPositive );
+ expected = [ false, false, false, false, false ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );
+ actual =cusomeBy( x, 1, isPositive );
+ expected = [ true, true, true, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function cumulatively tests whether at least `n` elements in a provided array pass a test implemented by a predicate function (accessor array)', function test( t ) {
+ var expected;
+ var actual;
+ var x;
+
+ x = toAccessorArray( [ 1, 1, 0, 0, 0 ] );
+
+ actual = cusomeBy( x, 2, isPositive );
+ expected = [ false, true, true, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 0, 0, 0, 0, 0 ] );
+ actual = cusomeBy( x, 2, isPositive );
+ expected = [ false, false, false, false, false ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 1, 1, 1, 1, 1 ] );
+ actual = cusomeBy( x, 4, isPositive );
+ expected = [ false, false, false, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 0, 1, 0 ] );
+ actual = cusomeBy( x, 1, isPositive );
+ expected = [ false, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+
+ x = toAccessorArray( [ 1, 0, 0, 0, 0 ] );
+ actual = cusomeBy( x, 0, isPositive );
+ expected = [ true, true, true, true, true ];
+ t.deepEqual( actual, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns an empty array if provided an empty input array as first argument', function test( t ) {
+ var x = [];
+ t.deepEqual( cusomeBy( x, 1, isPositive ), [], 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports providing an execution context', function test( t ) {
+ var expected;
+ var out;
+ var ctx;
+ var x;
+
+ ctx = {
+ 'count': 0
+ };
+
+ x = [ 0, 0, 0, 1, 1 ];
+
+ out = cusomeBy( x, 1, predicate, ctx );
+ expected = [ false, false, false, true, true ];
+
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.strictEqual( ctx.count, 4, 'returns expected value' );
+ t.end();
+
+ function predicate( v ) {
+ this.count += 1; // eslint-disable-line no-invalid-this
+ return ( v > 0 );
+ }
+});