ts-iterable-functions
    Preparing search index...

    Function toArrayConst

    • Materializes the source iterable into a concrete array.

      Curried version of _toArray.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Returns (src: Iterable) => 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]