ts-iterable-functions
    Preparing search index...

    Function _toArray

    • Materializes the source iterable into a concrete array.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • src: Iterable<T>

        Source iterable to expand.

      Returns T[]

      An array containing every element yielded by src in iteration order.

      const snapshot = _toArray(new Set([1, 2, 3]));
      console.log(snapshot); // [1, 2, 3]

      or using the curried version:

      const snapshot = pipeInto(new Set([1, 2, 3]), toArray());
      console.log(snapshot); // [1, 2, 3]