time-to-botec/js/node_modules/@stdlib/assert/has-async-iterator-symbol-support/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

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>