Checks if the value looks like it is async iterable, contains a [symbol.asyncIterator].
Identifies the return type of the async iterator
The value to be checked
True if the value is an AsyncIterable, otherwise false
0.14.0
isAsyncIterable(null); // falseisAsyncIterable(undefined); // falseisAsyncIterable("null"); // falseisAsyncIterable([]); // falseasync function* asyncGenerator() { yield 1;}isAsyncIterable(asyncGenerator()); // true Copy
isAsyncIterable(null); // falseisAsyncIterable(undefined); // falseisAsyncIterable("null"); // falseisAsyncIterable([]); // falseasync function* asyncGenerator() { yield 1;}isAsyncIterable(asyncGenerator()); // true
Checks if the value looks like it is async iterable, contains a [symbol.asyncIterator].