• Creates a duplicate-free version of an array, using SameValueZero for equality comparisons, in which only the first occurrence of each element is kept.

    Type Parameters

    • T

    Parameters

    • array: undefined | null | List<T>

      The array to inspect.

    Returns T[]

    Returns the new duplicate free array.

    _.uniq([2, 1, 2]);
    // => [2, 1]