• Creates a new array with duplicate values removed.

    This function takes an array as input and filters out duplicate elements, returning a new array that contains only unique values. The original array remains unchanged.

    Example

    const numbers = [1, 2, 2, 3, 4, 4, 5];
    const uniqueNumbers = uniqueeArray(numbers);
    // Output: [1, 2, 3, 4, 5]

    Type Parameters

    • T extends any[]

    Parameters

    • input: T

      The input array from which duplicates will be removed.

    Returns T