Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
609 bytes
|
Line | |
---|
1 | /**
|
---|
2 | Create an array of unique values, in order, from the input arrays.
|
---|
3 |
|
---|
4 | @example
|
---|
5 | ```
|
---|
6 | import arrayUnion = require('array-union');
|
---|
7 |
|
---|
8 | arrayUnion([1, 1, 2, 3], [2, 3]);
|
---|
9 | //=> [1, 2, 3]
|
---|
10 |
|
---|
11 | arrayUnion(['foo', 'foo', 'bar']);
|
---|
12 | //=> ['foo', 'bar']
|
---|
13 |
|
---|
14 | arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
---|
15 | //=> ['🐱', '🦄', '🐻', '🌈']
|
---|
16 |
|
---|
17 | arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
---|
18 | //=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
---|
19 | ```
|
---|
20 | */
|
---|
21 | declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
|
---|
22 | ...arguments: readonly ArgumentsType[]
|
---|
23 | ): ArgumentsType;
|
---|
24 |
|
---|
25 | export = arrayUnion;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.