@mirei/ts-collections
    Preparing search index...

    Function from

    • Wraps an iterable with the library's IEnumerable implementation.

      Type Parameters

      • TElement

        Type of elements within the source iterable.

      Parameters

      • source: Iterable<TElement>

        The iterable to expose as an enumerable sequence.

      Returns IEnumerable<TElement>

      An enumerable view over the given iterable.

      The returned sequence defers enumeration of source until iterated.

      const numbers = [1, 2, 3];
      const enumerable = from(numbers);
      console.log(enumerable.toArray()); // [1, 2, 3]