Skip to content

Commit 2c75df7

Browse files
committed
Use assertion utility
1 parent 66112d7 commit 2c75df7

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/array/to-iterator/benchmark

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/array/to-iterator/benchmark/benchmark.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25+
var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
2526
var pkg = require( './../package.json' ).name;
2627
var array2iterator = require( './../lib' );
2728

@@ -44,7 +45,7 @@ bench( pkg, function benchmark( b ) {
4445
}
4546
}
4647
b.toc();
47-
if ( typeof iter !== 'object' || typeof iter.next !== 'function' ) {
48+
if ( !isIteratorLike( iter ) ) {
4849
b.fail( 'should return an iterator protocol-compliant object' );
4950
}
5051
b.pass( 'benchmark finished' );

0 commit comments

Comments
 (0)