2.0 KiB
2.0 KiB
Iterator Symbol Support
Detect native
Symbol.iterator
support.
Usage
var hasIteratorSymbolSupport = require( '@stdlib/assert/has-iterator-symbol-support' );
hasIteratorSymbolSupport()
Detects if a runtime environment supports ES2015 Symbol.iterator
.
var bool = hasIteratorSymbolSupport();
// returns <boolean>
Examples
var hasIteratorSymbolSupport = require( '@stdlib/assert/has-iterator-symbol-support' );
var bool = hasIteratorSymbolSupport();
if ( bool ) {
console.log( 'Environment has Symbol.iterator support.' );
} else {
console.log( 'Environment lacks Symbol.iterator support.' );
}
CLI
Usage
Usage: has-iterator-symbol-support [options]
Options:
-h, --help Print this message.
-V, --version Print the package version.
Examples
$ has-iterator-symbol-support
<boolean>