ts-utils
    Preparing search index...

    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.

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