Function union

  • Creates an array of unique values, in order, from all given arrays using SameValueZero for equality comparisons.

    Type Parameters

    • T

    Parameters

    • Optional Rest...arrays: T[][]

      The arrays to inspect.

    Returns T[]

    Returns the new array of combined values.

    0.1.0

    difference, unionBy, unionWith, without, xor, xorBy

    union([2, 3], [1, 2])
    // => [2, 3, 1]