import { isAsyncIterable } from "https://deno.land/x/isx@1.0.0-beta.19/mod.ts";
Whether the value is AsyncIterable
or not.
Parameters
- Any value.
import { isAsyncIterable } from "https://deno.land/x/isx@$VERSION/mod.ts"
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts"
assertEquals(
isAsyncIterable({
async *[Symbol.asyncIterator]() {
yield "hello";
},
}),
true,
);
assertEquals(isAsyncIterable(() => {}), false);