Documentation
    Preparing search index...

    Function reduce

    • Reduces chunks in to one accumulator. Once the stream is cancelled, the accumulator will be queued.

      Type Parameters

      • I
      • O

      Parameters

      Returns TransformStream<I, O>

      --a-------b-------c-----|

      reduce([], (acc, chunk) => [...acc, chunk])

      ------------------------[a,b,c]-|