Deprecated
Use object/is_async_iterable instead.
import { isAsyncIterable } from "https://deno.land/x/isx@1.5.0/is_async_iterable.ts";
Whether the input is AsyncIterable
or not.
Examples
Example 1
Example 1
import { isAsyncIterable } from "https://deno.land/x/isx@$VERSION/is_async_iterable.ts"
import { assertEquals } from "https://deno.land/std/testing/asserts.ts"
assertEquals(
isAsyncIterable({
async *[Symbol.asyncIterator]() {
yield "hello";
},
}),
true,
);
assertEquals(isAsyncIterable(() => {}), false);