peach a19a732be8 commit message | 2 anni fa | |
---|---|---|
.. | ||
index.d.ts | 2 anni fa | |
index.js | 2 anni fa | |
license | 2 anni fa | |
package.json | 2 anni fa | |
readme.md | 2 anni fa |
Create an array of unique values, in order, from the input arrays
$ npm install array-union
const arrayUnion = require('array-union');
arrayUnion([1, 1, 2, 3], [2, 3]);
//=> [1, 2, 3]
arrayUnion(['foo', 'foo', 'bar']);
//=> ['foo', 'bar']
arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
//=> ['🐱', '🦄', '🐻', '🌈']
arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
MIT © Sindre Sorhus