codetrix - v1.5.0
    Preparing search index...

    Function unique

    • Removes duplicate values from an array.

      Type Parameters

      • T

        The type of array elements.

      Parameters

      • array: T[]

        The array to process.

      Returns T[]

      A new array with only unique values.

      unique([1, 2, 2, 3]); // [1, 2, 3]