import { fromIterable } from "https://deno.land/x/aitertools@0.6.0/src/collections.ts";
Turns a synchrnous iterable source
into an async iterable.
import { fromIterable } from "./collections.ts";
function* iterable() { yield 1; yield 2; yield 3; }
const asyncIterable = fromIterable(iterable());
for await (const value of asyncIterable) console.log(value);
The above example will print the following lines:
1
2
3