is-async-iterable
v1.0.2
Published
Checks if a given object is async iterable.
Downloads
4
Readme
is-async-iterable
Checks if a given object is async iterable.
Async iterable fun
This module is part of Async iterable fun, a complete toolset of modules to work with async iterables.
Usage
Check some objects:
const isAsyncIterable = require("is-async-iterable");
async function iter* () {
yield 1;
yield 2;
}
console.log(isAsyncIterable(iter));
console.log(isAsyncIterable(42));
This will output
true
false
API
isAsyncIterable
Return true if the argument is async iterable
Parameters
val
any value to check
Returns Boolean true if the value is async iterable
Install
With npm installed, run
npm install --save is-async-iterable
See Also
License
MIT