We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66112d7 commit 2c75df7Copy full SHA for 2c75df7
lib/node_modules/@stdlib/array/to-iterator/benchmark/benchmark.js
@@ -22,6 +22,7 @@
22
23
var bench = require( '@stdlib/bench' );
24
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25
+var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
26
var pkg = require( './../package.json' ).name;
27
var array2iterator = require( './../lib' );
28
@@ -44,7 +45,7 @@ bench( pkg, function benchmark( b ) {
44
45
}
46
47
b.toc();
- if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
48
+ if ( !isIteratorLike( iter ) ) {
49
b.fail( 'should return an iterator protocol-compliant object' );
50
51
b.pass( 'benchmark finished' );
0 commit comments