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