Skip to content

Unique

unique is a function to return an array that remove all duplicate values.

Example

This function removes all identical values ​​from an array, resulting in an array containing unique values:

ts
import { unique } from "@titocandradev/neatcore";

const result = unique([1, 1, 2, 3]);
// [1, 2, 3]