Function unique

  • Creates a duplicate-free version of an array.

    Type Parameters

    • Item

      Type of the array elements.

    Parameters

    • array: Item[]

      The array to inspect.

    Returns Item[]

    The new duplicate free array.

    Example

    unique([1, 1, 2, 1, 3, 4, 4, 5]);
    // => [1, 2, 3, 4, 5]

Generated using TypeDoc