uniqueArray
Removes duplicate items from an array and returns an array with unique values.> uniqueArray<T>(arr: T[]): T[]
- arr: An array of any type `T` to be de-duplicated.
- Returns: A new array containing only unique items from the original array.
Example
import { uniqueArray } from "@explita/daily-toolset";
const numbers = [1, 2, 2, 3, 4, 4, 5];
console.log(uniqueArray(numbers)); // [1, 2, 3, 4, 5]