Options
All
  • Public
  • Public/Protected
  • All
Menu

Module unzipWith

Index

References

Functions Array

References

Renames and re-exports unzipWith

Array Functions

  • unzipWith<T>(array: T[][], iteratee?: Function): T[]
  • This method is like unzip except that it accepts iteratee to specify how regrouped values should be combined. The iteratee is invoked with the elements of each group: (...group).

    since

    5.7.0

    example
    const zipped = zip([1, 2], [10, 20], [100, 200])
    // => [[1, 10, 100], [2, 20, 200]]

    unzipWith(zipped, add)
    // => [3, 30, 300]

    Type parameters

    • T

    Parameters

    • array: T[][]

      The array of grouped elements to process.

    • Optional iteratee: Function

      The function to combine regrouped values.

    Returns T[]

    Returns the new array of regrouped elements.