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

    Function forEach

    • Creates a sink executing a side effect for each item and consuming the stream.

      Terminal operation that triggers stream execution.

      Type Parameters

      • V

        The type of items in the stream

      Parameters

      • consumer: (item: V) => unknown

        The function to execute for each item (return value is ignored)

      Returns Sink<V, number>

      A sink that executes the consumer for each item and returns the number of processed items