Skip to main content
variable unique
import { unique } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Returns all unique values in an array.

Create a Set from the given array to discard duplicated values, then use the spread operator (...) to convert it back to an array.

type

(arr: any[]) => unknown