yta
    Preparing search index...

    Function asAsync

    • Turns an iterator of promises into an async iterator. Handy if you need to map items into async results, or if you have an array of promises and want to iterate through the results.

      import { async, pipe, sync } from "yta";
      import { asAsync } from "yta/sync";

      await pipe(sync.range(5), asAsync(), async.toArray());
      // => [0, 1, 2, 3, 4]

      Type Parameters

      • A

      Returns (items: Iterable<A | Promise<A>>) => AsyncGenerator<A, void>