yta
    Preparing search index...

    Function count

    • Count the items in the iterator and consume it.

      import { pipe } from "yta";
      import { count, range } from "yta/async";

      pipe(range(10), count());
      // => 10

      Type Parameters

      • A

        The input type

      Returns (items: AsyncIterable<A>) => Promise<number>