diff --git a/lib/node_modules/@stdlib/iter/cuany-by/README.md b/lib/node_modules/@stdlib/iter/cuany-by/README.md
new file mode 100644
index 00000000000..4d5a558dadf
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/README.md
@@ -0,0 +1,202 @@
+
+
+# iterCuAnyBy
+
+> Create an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function.
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var iterCuAnyBy = require( '@stdlib/iter/cuany-by' );
+```
+
+#### iterCuAnyBy( iterator, predicate\[, thisArg] )
+
+Returns an [iterator][mdn-iterator-protocol] which cumulatively tests whether at least one iterated value passes a test implemented by a `predicate` function.
+
+```javascript
+var array2iterator = require( '@stdlib/array/to-iterator' );
+
+function predicate( v ) {
+ return ( v > 0 );
+}
+
+var arr = array2iterator( [ 0, 0, 0, 1, 0 ] );
+
+var it = iterCuAnyBy( arr, predicate );
+
+var v = it.next().value;
+// returns false
+
+v = it.next().value;
+// returns false
+
+v = it.next().value;
+// returns false
+
+v = it.next().value;
+// returns true
+
+v = it.next().value;
+// returns true
+
+var bool = it.next().done;
+// returns true
+```
+
+The returned [iterator][mdn-iterator-protocol] protocol-compliant object has the following properties:
+
+- **next**: function which returns an [iterator][mdn-iterator-protocol] protocol-compliant object containing the next iterated value (if one exists) assigned to a `value` property and a `done` property having a `boolean` value indicating whether the [iterator][mdn-iterator-protocol] is finished.
+- **return**: function which closes an [iterator][mdn-iterator-protocol] and returns a single (optional) argument in an [iterator][mdn-iterator-protocol] protocol-compliant object.
+
+A `predicate` function is provided two arguments:
+
+- **value**: iterated value
+- **index**: iteration index (zero-based)
+
+To set the `predicate` function execution context, provide a `thisArg`.
+
+
+
+```javascript
+var array2iterator = require( '@stdlib/array/to-iterator' );
+
+function predicate( v ) {
+ this.count += 1;
+ return ( v < 0 );
+}
+
+var ctx = {
+ 'count': 0
+};
+
+var it = iterCuAnyBy( array2iterator( [ 1, 2, -1, 4 ] ), predicate, ctx );
+// returns
+
+
+
+
+
+
+
+## Notes
+
+- A `predicate` function is invoked for each iterated value until the first truthy `predicate` function return value. Upon encountering the first truthy return value, the returned iterator ceases to invoke the `predicate` function and returns `true` for each subsequent iterated value of the provided input `iterator`.
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var randu = require( '@stdlib/random/iter/randu' );
+var iterCuAnyBy = require( '@stdlib/iter/cuany-by' );
+
+function threshold( r ) {
+ return ( r > 0.95 );
+}
+
+// Create an iterator which generates uniformly distributed pseudorandom numbers:
+var opts = {
+ 'iter': 100
+};
+var riter = randu( opts );
+
+// Create an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function:
+var it = iterCuAnyBy( riter, threshold );
+
+// Perform manual iteration...
+var r;
+while ( true ) {
+ r = it.next();
+ if ( r.done ) {
+ break;
+ }
+ console.log( r.value );
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[mdn-iterator-protocol]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol
+
+
+
+
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/benchmark/benchmark.js b/lib/node_modules/@stdlib/iter/cuany-by/benchmark/benchmark.js
new file mode 100644
index 00000000000..8305898f3aa
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/benchmark/benchmark.js
@@ -0,0 +1,89 @@
+/**
+* @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 iterConstant = require( '@stdlib/iter/constant' );
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
+var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
+var pkg = require( './../package.json' ).name;
+var iterCuAnyBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Predicate function.
+*
+* @private
+* @param {*} value - value
+* @returns {boolean} result
+*/
+function predicate( value ) {
+ return ( value < 0 );
+}
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+ var iter;
+ var it;
+ var i;
+
+ it = iterConstant( 3.14 );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ iter = iterCuAnyBy( it, predicate );
+ if ( typeof iter !== 'object' ) {
+ b.fail( 'should return an object' );
+ }
+ }
+ b.toc();
+ if ( !isIteratorLike( iter ) ) {
+ b.fail( 'should return an iterator protocol-compliant object' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::iteration', function benchmark( b ) {
+ var iter;
+ var v;
+ var i;
+
+ iter = iterCuAnyBy( iterConstant( 3.14 ), predicate );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = iter.next().value;
+ if ( !isBoolean( v ) ) {
+ b.fail( 'should return a boolean' );
+ }
+ }
+ b.toc();
+ if ( !isBoolean( v ) ) {
+ b.fail( 'should return a boolean' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/docs/repl.txt b/lib/node_modules/@stdlib/iter/cuany-by/docs/repl.txt
new file mode 100644
index 00000000000..963c58fc713
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/docs/repl.txt
@@ -0,0 +1,64 @@
+
+{{alias}}( iterator, predicate[, thisArg] )
+ Returns an iterator which cumulatively tests whether at least one iterated
+ value passes a test implemented by a predicate function.
+
+ If an environment supports Symbol.iterator and a provided iterator is
+ iterable, the returned iterator is iterable.
+
+ The predicate function is provided two arguments:
+
+ - value: iterated value
+ - index: iteration index
+
+ A predicate function is invoked for each iterated value until the first
+ truthy predicate function return value. Upon encountering the first truthy
+ return value, the returned iterator ceases to invoke the predicate function
+ and returns `true` for each subsequent iterated value of the provided input
+ iterator.
+
+ If provided an iterator which does not return any iterated values, the
+ function returns an iterator which is also empty.
+
+ Parameters
+ ----------
+ iterator: Object
+ Input iterator.
+
+ predicate: Function
+ The test function.
+
+ thisArg: any (optional)
+ Execution context.
+
+ Returns
+ -------
+ iterator: Object
+ Iterator.
+
+ iterator.next(): Function
+ Returns an iterator protocol-compliant object containing the next
+ iterated value (if one exists) and a boolean flag indicating
+ whether the iterator is finished.
+
+ iterator.return( [value] ): Function
+ Finishes an iterator and returns a provided value.
+
+ Examples
+ --------
+ > var arr = {{alias:@stdlib/array/to-iterator}}( [ 0, 0, 0, 1, 0 ] );
+ > function fcn( v ) { return ( v > 0 ); };
+ > var it = {{alias}}( arr, fcn );
+ > var v = it.next().value
+ false
+ > v = it.next().value
+ false
+ > v = it.next().value
+ false
+ > v = it.next().value
+ true
+ > v = it.next().value
+ true
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/cuany-by/docs/types/index.d.ts
new file mode 100644
index 00000000000..07d61e3cfb6
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/docs/types/index.d.ts
@@ -0,0 +1,98 @@
+/*
+* @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 { TypedIterator, TypedIterableIterator } from '@stdlib/types/iter';
+
+// Define a union type representing both iterable and non-iterable iterators:
+type Iterator = TypedIterator | TypedIterableIterator;
+
+/**
+* Checks whether an iterated value passes a test.
+*
+* @returns boolean indicating whether an iterated value passes a test
+*/
+type Nullary = ( this: U ) => boolean;
+
+/**
+* Checks whether an iterated value passes a test.
+*
+* @param value - iterated value
+* @returns boolean indicating whether an iterated value passes a test
+*/
+type Unary = ( this: U, value: T ) => boolean;
+
+/**
+* Checks whether an iterated value passes a test.
+*
+* @param value - iterated value
+* @param index - iteration index
+* @returns boolean indicating whether an iterated value passes a test
+*/
+type Binary = ( this: U, value: T, index: number ) => boolean;
+
+/**
+* Checks whether an iterated value passes a test.
+*
+* @param value - iterated value
+* @param index - iteration index
+* @returns boolean indicating whether an iterated value passes a test
+*/
+type Predicate = Nullary | Unary | Binary;
+
+/**
+* Returns an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function.
+*
+* @param iterator - source iterator
+* @param predicate - predicate function
+* @param thisArg - execution context
+* @returns iterator
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+*
+* function isPositive( v ) {
+* return ( v > 0 );
+* }
+*
+* var it = iterCuAnyBy( array2iterator( [ 0, 0, 0, 1, 0 ] ), isPositive );
+*
+* var v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*/
+declare function iterCuAnyBy( iterator: Iterator, predicate: Predicate, thisArg?: ThisParameterType> ): Iterator;
+
+
+// EXPORTS //
+
+export = iterCuAnyBy ;
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/docs/types/test.ts b/lib/node_modules/@stdlib/iter/cuany-by/docs/types/test.ts
new file mode 100644
index 00000000000..63f44165e16
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/docs/types/test.ts
@@ -0,0 +1,109 @@
+/*
+* @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 { TypedIterator, TypedIteratorResult } from '@stdlib/types/iter';
+import iterCuAnyBy = require( './index' );
+
+/**
+* Implements the iterator protocol `next` method.
+*
+* @returns iterator protocol-compliant object
+*/
+function next(): TypedIteratorResult {
+ return {
+ 'value': 2.0,
+ 'done': false
+ };
+}
+
+/**
+* Returns an iterator protocol-compliant object.
+*
+* @returns iterator protocol-compliant object
+*/
+function iterator(): TypedIterator {
+ return {
+ 'next': next
+ };
+}
+
+/**
+* Predicate function.
+*
+* @param _v - iterated value
+* @param i - iteration index
+* @returns a boolean
+*/
+function predicate1( _v: any, i: number ): boolean {
+ return ( i > 10 );
+}
+
+/**
+* Predicate function.
+*
+* @param v - iterated value
+* @returns a boolean
+*/
+function predicate2( v: any ): boolean {
+ return ( v !== v );
+}
+
+
+// TESTS //
+
+// The function returns an iterator...
+{
+ iterCuAnyBy( iterator(), predicate1 ); // $ExpectType Iterator
+ iterCuAnyBy( iterator(), predicate2 ); // $ExpectType Iterator
+ iterCuAnyBy( iterator(), predicate1, {} ); // $ExpectType Iterator
+ iterCuAnyBy( iterator(), predicate2, {} ); // $ExpectType Iterator
+ iterCuAnyBy( iterator(), predicate1, null ); // $ExpectType Iterator
+ iterCuAnyBy( iterator(), predicate2, null ); // $ExpectType Iterator
+}
+
+// The compiler throws an error if the function is provided a first argument which is not an iterator protocol-compliant object...
+{
+ iterCuAnyBy( '5', predicate1 ); // $ExpectError
+ iterCuAnyBy( 5, predicate1 ); // $ExpectError
+ iterCuAnyBy( true, predicate1 ); // $ExpectError
+ iterCuAnyBy( false, predicate1 ); // $ExpectError
+ iterCuAnyBy( null, predicate1 ); // $ExpectError
+ iterCuAnyBy( undefined, predicate1 ); // $ExpectError
+ iterCuAnyBy( [], predicate1 ); // $ExpectError
+ iterCuAnyBy( {}, predicate1 ); // $ExpectError
+ iterCuAnyBy( ( x: number ): number => x, predicate1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a predicate function...
+{
+ iterCuAnyBy( iterator(), '5' ); // $ExpectError
+ iterCuAnyBy( iterator(), 5 ); // $ExpectError
+ iterCuAnyBy( iterator(), true ); // $ExpectError
+ iterCuAnyBy( iterator(), false ); // $ExpectError
+ iterCuAnyBy( iterator(), null ); // $ExpectError
+ iterCuAnyBy( iterator(), undefined ); // $ExpectError
+ iterCuAnyBy( iterator(), [] ); // $ExpectError
+ iterCuAnyBy( iterator(), {} ); // $ExpectError
+ iterCuAnyBy( iterator(), ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided insufficient arguments...
+{
+ iterCuAnyBy(); // $ExpectError
+ iterCuAnyBy( iterator() ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/examples/index.js b/lib/node_modules/@stdlib/iter/cuany-by/examples/index.js
new file mode 100644
index 00000000000..fa74098fc6c
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/examples/index.js
@@ -0,0 +1,45 @@
+/**
+* @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 randu = require( '@stdlib/random/iter/randu' );
+var iterCuAnyBy = require( './../lib' );
+
+function threshold( r ) {
+ return ( r > 0.95 );
+}
+
+// Create an iterator which generates uniformly distributed pseudorandom numbers:
+var opts = {
+ 'iter': 100
+};
+var riter = randu( opts );
+
+// Create an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function:
+var it = iterCuAnyBy( riter, threshold );
+
+// Perform manual iteration...
+var r;
+while ( true ) {
+ r = it.next();
+ if ( r.done ) {
+ break;
+ }
+ console.log( r.value );
+}
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/lib/index.js b/lib/node_modules/@stdlib/iter/cuany-by/lib/index.js
new file mode 100644
index 00000000000..30e1bee7b40
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/lib/index.js
@@ -0,0 +1,65 @@
+/**
+* @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';
+
+/**
+* Create an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function.
+*
+* @module @stdlib/iter/cuany-by
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+* var iterCuAnyBy = require( '@stdlib/iter/cuany-by' );
+*
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var arr = array2iterator( [ 0, 0, 0, 1, 0 ] );
+*
+* var it = iterCuNoneBy( arr, isPositive );
+*
+* var v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* var bool = it.next().done;
+* // returns true
+*/
+
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/lib/main.js b/lib/node_modules/@stdlib/iter/cuany-by/lib/main.js
new file mode 100644
index 00000000000..79a52fe1816
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/lib/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 setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var isFunction = require( '@stdlib/assert/is-function' );
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
+var iteratorSymbol = require( '@stdlib/symbol/iterator' );
+var format = require( '@stdlib/string/format' );
+
+
+// MAIN //
+
+/**
+* Returns an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function.
+*
+* @param {Iterator} iterator - input iterator
+* @param {Function} predicate - predicate function
+* @param {*} [thisArg] - execution context
+* @throws {TypeError} first argument must be an iterator
+* @throws {TypeError} second argument must be a predicate function
+* @returns {Iterator} iterator
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+*
+* function isPositive( value ) {
+* return ( value > 0 );
+* }
+*
+* var arr = array2iterator( [ 0, 0, 0, 1, 0 ] );
+*
+* var it = iterCuAnyBy( arr, isPositive );
+*
+* var v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* var bool = it.next().done;
+* // returns true
+*/
+function iterCuAnyBy( iterator, predicate, thisArg ) {
+ var value;
+ var iter;
+ var FLG;
+ var i;
+ if ( !isIteratorLike( iterator ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be an iterator. Value: `%s`.', iterator ) );
+ }
+ if ( !isFunction( predicate ) ) {
+ throw new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', predicate ) );
+ }
+ value = false;
+ i = -1;
+
+ // Create an iterator protocol-compliant object:
+ iter = {};
+ setReadOnly( iter, 'next', next );
+ setReadOnly( iter, 'return', end );
+
+ // If an environment supports `Symbol.iterator`, make the iterator iterable:
+ if ( iteratorSymbol && isFunction( iterator[ iteratorSymbol ] ) ) {
+ setReadOnly( iter, iteratorSymbol, factory );
+ }
+ return iter;
+
+ /**
+ * Returns an iterator protocol-compliant object containing the next iterated value.
+ *
+ * @private
+ * @returns {Object} iterator protocol-compliant object
+ */
+ function next() {
+ var v;
+ if ( FLG ) {
+ return {
+ 'done': true
+ };
+ }
+ v = iterator.next();
+ if ( v.done ) {
+ FLG = true;
+ return v;
+ }
+ i += 1;
+ if ( !value && predicate.call( thisArg, v.value, i ) ) {
+ value = true;
+ }
+ return {
+ 'value': value,
+ 'done': false
+ };
+ }
+
+ /**
+ * Finishes an iterator.
+ *
+ * @private
+ * @param {*} [value] - value to return
+ * @returns {Object} iterator protocol-compliant object
+ */
+ function end( value ) {
+ FLG = true;
+ if ( arguments.length ) {
+ return {
+ 'value': value,
+ 'done': true
+ };
+ }
+ return {
+ 'done': true
+ };
+ }
+
+ /**
+ * Returns a new iterator.
+ *
+ * @private
+ * @returns {Iterator} iterator
+ */
+ function factory() {
+ return iterCuAnyBy( iterator[ iteratorSymbol ](), predicate, thisArg );
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = iterCuAnyBy;
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/package.json b/lib/node_modules/@stdlib/iter/cuany-by/package.json
new file mode 100644
index 00000000000..04231925dd3
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@stdlib/iter/cuany-by",
+ "version": "0.0.0",
+ "description": "Create an iterator which cumulatively tests whether at least one iterated value passes 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",
+ "stdutils",
+ "stdutil",
+ "utilities",
+ "utility",
+ "utils",
+ "util",
+ "test",
+ "any",
+ "iterate",
+ "iterator",
+ "iter",
+ "validate"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/iter/cuany-by/test/test.js b/lib/node_modules/@stdlib/iter/cuany-by/test/test.js
new file mode 100644
index 00000000000..47a93b6717b
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cuany-by/test/test.js
@@ -0,0 +1,365 @@
+/**
+* @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 proxyquire = require( 'proxyquire' );
+var array2iterator = require( '@stdlib/array/to-iterator' );
+var randu = require( '@stdlib/random/iter/randu' );
+var iteratorSymbol = require( '@stdlib/symbol/iterator' );
+var noop = require( '@stdlib/utils/noop' );
+var iterCuAnyBy = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Predicate function.
+*
+* @private
+* @param {*} value - value
+* @returns {boolean} result
+*/
+function predicate( value ) {
+ return ( value > 0 );
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof iterCuAnyBy, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if not provided an iterator', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ {},
+ [],
+ function noop() {}
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[i] ), TypeError, 'throws a type error when provided '+values[i] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ iterCuAnyBy( value, noop );
+ };
+ }
+});
+
+tape( 'the function throws an error if not provided a predicate function as a second argument', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ -5,
+ 0,
+ 3.14,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ {},
+ []
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[i] ), TypeError, 'throws a type error when provided '+values[i] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ iterCuAnyBy( array2iterator( [ 1, 2, 3 ] ), value );
+ };
+ }
+});
+
+tape( 'the function returns an iterator protocol-compliant object', function test( t ) {
+ var arr;
+ var it;
+ var r;
+ var i;
+
+ arr = array2iterator( [ 0, 0, 1, 0, 1 ] );
+ it = iterCuAnyBy( arr, predicate );
+ for ( i = 0; i < 5; i++ ) {
+ r = it.next();
+ t.equal( typeof r.value, 'boolean', 'returns expected value' );
+ t.equal( typeof r.done, 'boolean', 'returns expected value' );
+ }
+ t.equal( typeof r.done, 'boolean', 'returns expected value' );
+ t.end();
+});
+
+tape( 'if provided an "empty" iterator, the function returns an iterator which is also empty', function test( t ) {
+ var arr;
+ var it;
+ var v;
+
+ arr = array2iterator( [] );
+ it = iterCuAnyBy( arr, predicate );
+
+ v = it.next();
+ t.strictEqual( v.done, true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function returns an iterator which cumulatively tests whether at least one iterated value passes a test implemented by a predicate function', function test( t ) {
+ var expected;
+ var actual;
+ var values;
+ var it;
+ var i;
+
+ values = [ 0, 0, 1, 1, 0, 0 ];
+ expected = [
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'done': true
+ }
+ ];
+
+ it = iterCuAnyBy( array2iterator( values ), predicate );
+
+ actual = [];
+ for ( i = 0; i < expected.length; i++ ) {
+ actual.push( it.next() );
+ }
+ t.deepEqual( actual, expected, 'returns expected values' );
+ t.end();
+});
+
+tape( 'the returned iterator has a `return` method for closing an iterator (no argument)', function test( t ) {
+ var it;
+ var r;
+
+ it = iterCuAnyBy( randu(), predicate );
+
+ r = it.next();
+ t.equal( typeof r.value, 'boolean', 'returns expected value' );
+ t.equal( r.done, false, 'returns expected value' );
+
+ r = it.next();
+ t.equal( typeof r.value, 'boolean', 'returns expected value' );
+ t.equal( r.done, false, 'returns expected value' );
+
+ r = it.return();
+ t.equal( r.value, void 0, 'returns expected value' );
+ t.equal( r.done, true, 'returns expected value' );
+
+ r = it.next();
+ t.equal( r.value, void 0, 'returns expected value' );
+ t.equal( r.done, true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the returned iterator has a `return` method for closing an iterator (argument)', function test( t ) {
+ var it;
+ var r;
+
+ it = iterCuAnyBy( randu(), predicate );
+
+ r = it.next();
+ t.equal( typeof r.value, 'boolean', 'returns expected value' );
+ t.equal( r.done, false, 'returns expected value' );
+
+ r = it.next();
+ t.equal( typeof r.value, 'boolean', 'returns expected value' );
+ t.equal( r.done, false, 'returns expected value' );
+
+ r = it.return( 'foo' );
+ t.equal( r.value, 'foo', 'returns expected value' );
+ t.equal( r.done, true, 'returns expected value' );
+
+ r = it.next();
+ t.equal( r.value, void 0, 'returns expected value' );
+ t.equal( r.done, true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if an environment supports `Symbol.iterator` and the provided iterator is iterable, the returned iterator is iterable', function test( t ) {
+ var iterCuAnyBy;
+ var opts;
+ var rand;
+ var it1;
+ var it2;
+ var i;
+
+ iterCuAnyBy = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__'
+ });
+
+ opts = {
+ 'seed': 12345
+ };
+ rand = randu( opts );
+ rand[ '__ITERATOR_SYMBOL__' ] = factory;
+
+ it1 = iterCuAnyBy( rand, predicate );
+ t.equal( typeof it1[ '__ITERATOR_SYMBOL__' ], 'function', 'has method' );
+ t.equal( it1[ '__ITERATOR_SYMBOL__' ].length, 0, 'has zero arity' );
+
+ it2 = it1[ '__ITERATOR_SYMBOL__' ]();
+ t.equal( typeof it2, 'object', 'returns an object' );
+ t.equal( typeof it2.next, 'function', 'has method' );
+ t.equal( typeof it2.return, 'function', 'has method' );
+
+ for ( i = 0; i < 100; i++ ) {
+ t.equal( it2.next().value, it1.next().value, 'returns expected value' );
+ }
+ t.end();
+
+ function factory() {
+ return randu( opts );
+ }
+});
+
+tape( 'if an environment does not support `Symbol.iterator`, the returned iterator is not "iterable"', function test( t ) {
+ var iterCuAnyBy;
+ var it;
+
+ iterCuAnyBy = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': false
+ });
+
+ it = iterCuAnyBy( randu(), predicate);
+ t.equal( it[ iteratorSymbol ], void 0, 'does not have property' );
+
+ t.end();
+});
+
+tape( 'if a provided iterator is not iterable, the returned iterator is not iterable', function test( t ) {
+ var iterCuAnyBy;
+ var rand;
+ var it;
+
+ iterCuAnyBy = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__'
+ });
+
+ rand = randu();
+ rand[ '__ITERATOR_SYMBOL__' ] = null;
+
+ it = iterCuAnyBy( rand, predicate );
+ t.equal( it[ iteratorSymbol ], void 0, 'does not have property' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying the predicate function execution context', function test( t ) {
+ var expected;
+ var actual;
+ var values;
+ var ctx;
+ var it;
+ var i;
+
+ ctx = {
+ 'count': 0
+ };
+
+ values = [ -1, -3, 2, 0, 1 ];
+ expected = [
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'done': true
+ }
+ ];
+
+ it = iterCuAnyBy( array2iterator( values ), predicate, ctx );
+ t.equal( it.next.length, 0, 'has zero arity' );
+
+ actual = [];
+ for ( i = 0; i < expected.length; i++ ) {
+ actual.push( it.next() );
+ }
+ t.deepEqual( actual, expected, 'returns expected values' );
+ t.equal( ctx.count, 3, 'returns expected value' );
+ t.end();
+
+ function predicate( v ) {
+ this.count += 1; // eslint-disable-line no-invalid-this
+ return ( v > 0 );
+ }
+});