UNPKG

344 BTypeScriptView Raw
1/**
2Create an array without duplicates.
3
4@param array - The array to remove duplicates from.
5
6@example
7```
8import arrayUniq from 'array-uniq';
9
10arrayUniq([1, 1, 2, 3, 3]);
11//=> [1, 2, 3]
12
13arrayUniq(['foo', 'foo', 'bar', 'foo']);
14//=> ['foo', 'bar']
15```
16*/
17export default function arrayUniq<ValueType>(array: readonly ValueType[]): ValueType[];