Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/vectorizer/mod.ts>useUnique

Machine Learning utilities for TypeScript
Latest
function useUnique
Re-export
import { useUnique } from "https://deno.land/x/vectorizer@v0.7.5/mod.ts";

Remove duplicate values in an array. Uses a strict = for identifying duplicates.

Parameters

arr: ArrayLike<T>

Array to remove duplicates from.

Returns

T[]

Array with only unique elements.