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

    Function toArray

    • Creates a sink collecting all items into an array.

      Type Parameters

      • V

        The type of items in the stream

      Returns Sink<V, readonly V[]>

      A sink that collects all items into an array

      await items([1, 2, 3])(toArray());  // [1, 2, 3]
      await items(new Set([1, 2, 3]))(toArray()); // [1, 2, 3]