@lucid-softworks/array-unique
v0.1.0
Published
Deduplicate an array while preserving first-occurrence order.
Maintainers
Readme
@lucid-softworks/array-unique
Deduplicate an array without changing first-occurrence order.
import { unique } from "@lucid-softworks/array-unique";
unique([3, 1, 3, 2, 1]); // [3, 1, 2]Equality follows JavaScript Set semantics: NaN values deduplicate, 0 and
-0 are equal, and objects compare by reference. The input is never mutated.
