File: index.d.ts

package info (click to toggle)
node-array-uniq 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 124 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
Create an array without duplicates.

@param array - The array to remove duplicates from.

@example
```
import arrayUniq = require('array-uniq');

arrayUniq([1, 1, 2, 3, 3]);
//=> [1, 2, 3]

arrayUniq(['foo', 'foo', 'bar', 'foo']);
//=> ['foo', 'bar']
```
*/
declare function arrayUniq<ValueType>(
	array: ReadonlyArray<ValueType>
): ValueType[];

export = arrayUniq;