|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
713 bytes
|
| Line | |
|---|
| 1 | # array-union [](https://travis-ci.org/sindresorhus/array-union)
|
|---|
| 2 |
|
|---|
| 3 | > Create an array of unique values, in order, from the input arrays
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | ## Install
|
|---|
| 7 |
|
|---|
| 8 | ```
|
|---|
| 9 | $ npm install array-union
|
|---|
| 10 | ```
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | ## Usage
|
|---|
| 14 |
|
|---|
| 15 | ```js
|
|---|
| 16 | const arrayUnion = require('array-union');
|
|---|
| 17 |
|
|---|
| 18 | arrayUnion([1, 1, 2, 3], [2, 3]);
|
|---|
| 19 | //=> [1, 2, 3]
|
|---|
| 20 |
|
|---|
| 21 | arrayUnion(['foo', 'foo', 'bar']);
|
|---|
| 22 | //=> ['foo', 'bar']
|
|---|
| 23 |
|
|---|
| 24 | arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
|---|
| 25 | //=> ['🐱', '🦄', '🐻', '🌈']
|
|---|
| 26 |
|
|---|
| 27 | arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
|---|
| 28 | //=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
|---|
| 29 | ```
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | ## License
|
|---|
| 33 |
|
|---|
| 34 | MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.