yta
    Preparing search index...

    Function flat

    • Flatten an aync iterator of iterators into a single async iterator of items.

      import { pipe } from "yta";
      import { flat, of, toArray } from "yta/async";

      await pipe(of(of(0, 3), of(3, 6)), flat(), toArray());
      // => [0, 3, 3, 6]

      See also:

      Type Parameters

      • A

        The item type

      Returns (iters: AsyncIterable<AsyncIterable<A, any, any>>) => AsyncGenerator<A, void>