Skip to content

unique<T>

Remove duplicates from an array.

Import:

import { unique } from 'obsidian-dev-utils/array';

Signature:

function unique(arr: readonly T[]): T[]

Parameters:

ParameterTypeDescription
arrreadonly T[]The array to remove duplicates from.

Returns: T[] — The array with duplicates removed.