unique
Reduces an Array of values to unique instances, keeping the first of each. Dates compare by time.
Basic example
Section titled “Basic example”Reduces [1, 2, 2, 3, 3, 3, 4] to [1, 2, 3, 4], keeping the first occurrence of each value and dropping later duplicates.
import {unique} from "@d3plus/data";
unique([1, 2, 2, 3, 3, 3, 4]);
Parameters
import {unique} from "@d3plus/data";