Return a copy of the array removing all duplicated elements.
The order of the elements is preserved.
the input array
a new array with unique elements
Unique numbers.
import { uniq } from "@trashpanda001/helpers/array"uniq([1, 2, 3, 4, 3, 2, 1])// [1, 2, 3, 4] Copy
import { uniq } from "@trashpanda001/helpers/array"uniq([1, 2, 3, 4, 3, 2, 1])// [1, 2, 3, 4]
Return a copy of the array removing all duplicated elements.
The order of the elements is preserved.