1 | # array-union
|
2 |
|
3 | > Create an array of unique values, in order, from the input arrays
|
4 |
|
5 | ## Install
|
6 |
|
7 | ```
|
8 | $ npm install array-union
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ```js
|
14 | import arrayUnion from 'array-union';
|
15 |
|
16 | arrayUnion([1, 1, 2, 3], [2, 3]);
|
17 | //=> [1, 2, 3]
|
18 |
|
19 | arrayUnion(['foo', 'foo', 'bar']);
|
20 | //=> ['foo', 'bar']
|
21 |
|
22 | arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
23 | //=> ['🐱', '🦄', '🐻', '🌈']
|
24 |
|
25 | arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
26 | //=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
27 | ```
|
28 |
|
29 | ---
|
30 |
|
31 | <div align="center">
|
32 | <b>
|
33 | <a href="https://tidelift.com/subscription/pkg/npm-array-union?utm_source=npm-array-union&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
34 | </b>
|
35 | <br>
|
36 | <sub>
|
37 | Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
38 | </sub>
|
39 | </div>
|