ts-iterable-functions
    Preparing search index...

    Function zipAllToTupleConst

    • Zips multiple iterables into tuples containing the co-indexed elements from each source.

      Curried version of _zipAllToTuple.

      Type Parameters

      • T extends readonly unknown[]

        Tuple type describing the elements produced by each input iterable.

      Returns (src: P0) => Iterable

      A deferred iterable yielding tuples of aligned elements.

      Error Rethrows any error thrown while enumerating the source iterables.

      const sources: Iterablified<[number, string]> = [
      [1, 2, 3],
      ["a", "b", "c"],
      ];
      const pairs = Array.from(_zipAllToTuple(sources));
      console.log(pairs); // [[1, "a"], [2, "b"], [3, "c"]]

      or using the curried version:

      const pairs = Array.from(
      pipeInto(
      [
      [1, 2],
      ["x", "y"],
      ] as Iterablified<[number, string]>,
      zipAllToTuple()
      )
      );
      console.log(pairs); // [[1, "x"], [2, "y"]]