@metreeca/pipe - v0.9.20
    Preparing search index...

    Function count

    • Creates a sink counting the total number of items in the stream.

      Type Parameters

      • V

        The type of items in the stream

      Returns Sink<V, number>

      A sink that counts all items in the stream

      await items([1, 2, 3, 4, 5])(count());  // 5
      await items([])(count()); // 0