collect
import { collect } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";Collect all values from an AsyncIterable into an array.
@example
import { collect } from "./async_iterable.ts";
import { fromIterable } from "./async_iterable.ts";
const numbers = fromIterable([1, 2, 3, 4, 5]);
const array = await collect(numbers);
console.log(array); // [1, 2, 3, 4, 5]
async function collect<A>(ta: AsyncIterable<A>): Promise<ReadonlyArray<A>>;