• Converts the async iterable to a promise that resolves to an array.

    Type Parameters

    • T

    Parameters

    • it: Iterable<T>

    Returns Promise<T[]>

    Example

    import { forAwait } from 'deleight/generators';
    async function* asyncGen() {
    yield *range(10);
    }
    await forAwait(asyncGen()); // [0, 1, ..., 9]