diff --git a/lib/node_modules/@stdlib/iter/cunone/README.md b/lib/node_modules/@stdlib/iter/cunone/README.md
new file mode 100644
index 00000000000..34bbac5bd3d
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/README.md
@@ -0,0 +1,160 @@
+
+
+# iterCuNone
+
+> Create an [iterator][mdn-iterator-protocol] which cumulatively tests whether every iterated value is falsy.
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var iterCuNone = require( '@stdlib/iter/cunone' );
+```
+
+#### iterCuNone( iterator )
+
+Returns an [iterator][mdn-iterator-protocol] which cumulatively tests whether every
+iterated value is falsy.
+
+```javascript
+var array2iterator = require( '@stdlib/array/to-iterator' );
+
+var arr = array2iterator( [ 0, 0, 0, 1, 0 ] );
+
+var it = iterCuNone( arr );
+// returns
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var randu = require( '@stdlib/random/iter/randu' );
+var iterMap = require( '@stdlib/iter/map' );
+var iterCuNone = require( '@stdlib/iter/cunone' );
+
+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 applies a threshold to generated numbers:
+var miter = iterMap( riter, threshold );
+
+// Create an iterator which cumulatively tests whether every iterated value is falsy.
+var it = iterCuNone( miter );
+
+// 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/cunone/benchmark/benchmark.js b/lib/node_modules/@stdlib/iter/cunone/benchmark/benchmark.js
new file mode 100644
index 00000000000..5c2b7085fa7
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/benchmark/benchmark.js
@@ -0,0 +1,75 @@
+/**
+* @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 iterCuNone = require( './../lib' );
+
+
+// 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 = iterCuNone( it );
+ 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 = iterCuNone( iterConstant( 3.14 ) );
+
+ 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/cunone/docs/repl.txt b/lib/node_modules/@stdlib/iter/cunone/docs/repl.txt
new file mode 100644
index 00000000000..d8c8aea8cba
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/docs/repl.txt
@@ -0,0 +1,44 @@
+
+{{alias}}( iterator )
+ Returns an iterator which cumulatively tests whether every iterated value is
+ falsy.
+
+ If an environment supports Symbol.iterator and a provided iterator is
+ iterable, the returned iterator is iterable.
+
+ Parameters
+ ----------
+ iterator: Object
+ Input iterator.
+
+ 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 ] );
+ > var it = {{alias}}( arr );
+ > var v = it.next().value
+ true
+ > v = it.next().value
+ true
+ > v = it.next().value
+ true
+ > v = it.next().value
+ false
+ > v = it.next().value
+ false
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/iter/cunone/docs/types/index.d.ts b/lib/node_modules/@stdlib/iter/cunone/docs/types/index.d.ts
new file mode 100644
index 00000000000..057b26ad583
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/docs/types/index.d.ts
@@ -0,0 +1,64 @@
+/*
+* @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 { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
+
+// Define a union type representing both iterable and non-iterable iterators:
+type Iterator = Iter | IterableIterator;
+
+/**
+* Returns an iterator which cumulatively tests whether every iterated value is falsy.
+*
+* @param iterator - input iterator
+* @returns iterator
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+*
+* var arr = array2iterator( [ false, false, false, true, false ] );
+*
+* var it = iterCuNone( arr );
+*
+* var v = it.next().value;
+* returns true
+*
+* v = it.next().value;
+* returns true
+*
+* v = it.next().value;
+* returns true
+*
+* v = it.next().value;
+* returns false
+*
+* v = it.next().value;
+* returns false
+*
+* var bool = it.next().done;
+* returns true
+*/
+declare function iterCuNone( iterator: Iterator ): Iterator;
+
+
+// EXPORTS //
+
+export = iterCuNone;
diff --git a/lib/node_modules/@stdlib/iter/cunone/docs/types/test.ts b/lib/node_modules/@stdlib/iter/cunone/docs/types/test.ts
new file mode 100644
index 00000000000..cb02cca9139
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/docs/types/test.ts
@@ -0,0 +1,69 @@
+/*
+* @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 { Iterator, IteratorResult } from '@stdlib/types/iter';
+import iterCuNone = require( './index' );
+
+/**
+* Implements the iterator protocol `next` method.
+*
+* @returns iterator protocol-compliant object
+*/
+function next(): IteratorResult {
+ return {
+ 'value': true,
+ 'done': false
+ };
+}
+
+/**
+* Returns an iterator protocol-compliant object.
+*
+* @returns iterator protocol-compliant object
+*/
+function iterator(): Iterator {
+ return {
+ 'next': next
+ };
+}
+
+
+// TESTS //
+
+// The function returns an iterator...
+{
+ iterCuNone( iterator() ); // $ExpectType Iterator
+}
+
+// The compiler throws an error if the function is provided a value other than an iterator protocol-compliant object...
+{
+ iterCuNone( '5' ); // $ExpectError
+ iterCuNone( 5 ); // $ExpectError
+ iterCuNone( true ); // $ExpectError
+ iterCuNone( false ); // $ExpectError
+ iterCuNone( null ); // $ExpectError
+ iterCuNone( undefined ); // $ExpectError
+ iterCuNone( [] ); // $ExpectError
+ iterCuNone( {} ); // $ExpectError
+ iterCuNone( ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided insufficient arguments...
+{
+ iterCuNone(); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/iter/cunone/examples/index.js b/lib/node_modules/@stdlib/iter/cunone/examples/index.js
new file mode 100644
index 00000000000..30df5870845
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/examples/index.js
@@ -0,0 +1,49 @@
+/**
+* @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 iterMap = require( '@stdlib/iter/map' );
+var iterCuNone = 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 applies a threshold to generated numbers:
+var miter = iterMap( riter, threshold );
+
+// Create an iterator which cumulatively tests whether every iterated value is falsy:
+var it = iterCuNone( miter );
+
+// 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/cunone/lib/index.js b/lib/node_modules/@stdlib/iter/cunone/lib/index.js
new file mode 100644
index 00000000000..5fb39d0207c
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/lib/index.js
@@ -0,0 +1,60 @@
+/**
+* @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 every iterated value is falsy.
+*
+* @module @stdlib/iter/cunone
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+* var iterCuNone = require( '@stdlib/iter/cunone' );
+*
+* var arr = array2iterator( [ false, false, false, true, false ] );
+*
+* var it = iterCuNone( arr );
+*
+* var v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* 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/cunone/lib/main.js b/lib/node_modules/@stdlib/iter/cunone/lib/main.js
new file mode 100644
index 00000000000..c6a9686cfc0
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/lib/main.js
@@ -0,0 +1,145 @@
+/**
+* @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 every iterated value is falsy.
+*
+* @param {Iterator} iterator - input iterator
+* @throws {TypeError} first argument must be an iterator
+* @returns {Iterator} iterator
+*
+* @example
+* var array2iterator = require( '@stdlib/array/to-iterator' );
+*
+* var arr = array2iterator( [ 0, 0, 0, 1, 0 ] );
+*
+* var it = iterCuNone( arr );
+*
+* var v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns true
+*
+* v = it.next().value;
+* // returns false
+*
+* v = it.next().value;
+* // returns false
+*
+* var bool = it.next().done;
+* // returns true
+*/
+function iterCuNone( iterator ) {
+ var value;
+ var iter;
+ var FLG;
+ if ( !isIteratorLike( iterator ) ) {
+ throw new TypeError( format( 'invalid argument. Must provide an iterator. Value: `%s`.', iterator ) );
+ }
+ value = true;
+
+ // Create an iterator protocol-compliant object:
+ iter = {};
+ setReadOnly( iter, 'next', next );
+ setReadOnly( iter, 'return', end );
+
+ // If an environment supports `Symbol.iterator` and the provided iterator is iterable, 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;
+ }
+ if ( v.value ) {
+ value = false;
+ }
+ 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 iterCuNone( iterator[ iteratorSymbol ]() );
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = iterCuNone;
diff --git a/lib/node_modules/@stdlib/iter/cunone/package.json b/lib/node_modules/@stdlib/iter/cunone/package.json
new file mode 100644
index 00000000000..c4d588a4188
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@stdlib/iter/cunone",
+ "version": "0.0.0",
+ "description": "Create an iterator which cumulatively tests whether every iterated value is falsy.",
+ "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",
+ "none",
+ "iterate",
+ "iterator",
+ "iter",
+ "validate"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/iter/cunone/test/test.js b/lib/node_modules/@stdlib/iter/cunone/test/test.js
new file mode 100644
index 00000000000..fe739cf2cb8
--- /dev/null
+++ b/lib/node_modules/@stdlib/iter/cunone/test/test.js
@@ -0,0 +1,322 @@
+/**
+* @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 iterCuNone = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof iterCuNone, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if not provided an iterator protocol-compliant object', 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() {
+ iterCuNone( 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 = iterCuNone( arr );
+ 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 all upstream iterator values are truthy, the function returns an iterator protocol-compliant object which returns all `false` values', function test( t ) {
+ var expected;
+ var actual;
+ var values;
+ var it;
+ var i;
+
+ values = [ 1, 1, 1, 1 ];
+ expected = [
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'done': true
+ }
+ ];
+
+ it = iterCuNone( array2iterator( values ) );
+
+ actual = [];
+ for ( i = 0; i < expected.length; i++ ) {
+ actual.push( it.next() );
+ }
+ t.deepEqual( actual, expected, 'returns expected values' );
+ t.end();
+});
+
+tape( 'if at least one upstream iterator value is truthy, the function returns an iterator protocol-compliant object which returns `false` values upon encountering the first truthy value', function test( t ) {
+ var expected;
+ var actual;
+ var values;
+ var it;
+ var i;
+
+ values = [ 0, 0, 1, 0 ];
+ expected = [
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'value': false,
+ 'done': false
+ },
+ {
+ 'done': true
+ }
+ ];
+
+ it = iterCuNone( array2iterator( values ) );
+
+ actual = [];
+ for ( i = 0; i < expected.length; i++ ) {
+ actual.push( it.next() );
+ }
+ t.deepEqual( actual, expected, 'returns expected values' );
+ t.end();
+});
+
+tape( 'if all upstream iterator values are falsy, the function returns an iterator protocol-compliant object which always returns truthy values', function test( t ) {
+ var expected;
+ var actual;
+ var values;
+ var it;
+ var i;
+
+ values = [ 0, 0, 0, 0 ];
+ expected = [
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'value': true,
+ 'done': false
+ },
+ {
+ 'done': true
+ }
+ ];
+
+ it = iterCuNone( array2iterator( values ) );
+
+ 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 = iterCuNone( randu() );
+
+ 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 = iterCuNone( randu() );
+
+ 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( 'finished' );
+ t.equal( r.value, 'finished', '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 iterCuNone;
+ var opts;
+ var rand;
+ var it1;
+ var it2;
+ var i;
+
+ iterCuNone = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__'
+ });
+
+ opts = {
+ 'seed': 12345
+ };
+ rand = randu( opts );
+ rand[ '__ITERATOR_SYMBOL__' ] = factory;
+
+ it1 = iterCuNone( rand );
+ 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 iterCuNone;
+ var it;
+
+ iterCuNone = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': false
+ });
+
+ it = iterCuNone( randu() );
+ 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 iterCuNone;
+ var rand;
+ var it;
+
+ iterCuNone = proxyquire( './../lib/main.js', {
+ '@stdlib/symbol/iterator': '__ITERATOR_SYMBOL__'
+ });
+
+ rand = randu();
+ rand[ '__ITERATOR_SYMBOL__' ] = null;
+
+ it = iterCuNone( rand );
+ t.equal( it[ iteratorSymbol ], void 0, 'does not have property' );
+
+ t.end();
+});