1.0.2 • Published 8 years ago
is-async-iterable v1.0.2
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
falseAPI
isAsyncIterable
Return true if the argument is async iterable
Parameters
valany value to check
Returns Boolean true if the value is async iterable
Install
With npm installed, run
npm install --save is-async-iterableSee Also
License
MIT