Tweakr
    Preparing search index...

    Function unionBy

    • Similar to union, but uses an iteratee function to determine uniqueness.

      Type Parameters

      • T

      Parameters

      • arrays: T[][]

        Arrays to combine

      • iteratee: (v: T) => any

        Function to compute uniqueness

      Returns T[]

      Array of unique values based on iteratee

      unionBy([{x:1}], [{x:2}], o => o.x); // [{x:1}, {x:2}]
      

      1.2.0