@szilanor/stream
    Preparing search index...

    Function toArray

    • Returns a collector that returns the source as an array.

      Type Parameters

      • T

        Type of items in the source.

      Returns CollectorFunction<T, T[]>

      Collector that returns the source as an array.

      const result = toArray<number>()([1, 2, 3]);
      console.log(result); // [1, 2, 3]