ts-iterable-functions
    Preparing search index...

    Function flattenConst

    • Flattens a single level of nested iterables into a lazy iterable of their elements.

      Curried version of _flatten.

      Type Parameters

      • T

        Element type produced by each inner iterable.

      Returns (src: Iterable) => Iterable

      A deferred iterable yielding every element from each inner iterable in order.

      const values = [..._flatten([[1, 2], [3, 4]])];
      console.log(values); // [1, 2, 3, 4]

      or using the curried version:

      const values = pipeInto(
      [["a"], ["b", "c"]],
      flatten()
      );
      console.log([...values]); // ["a", "b", "c"]