luckystarry - array-union 2.1.0

> npm install array-union@2.1.0


array-union Build Status

Create an array of unique values, in order, from the input arrays

Install

$ npm install array-union

Usage

const arrayUnion = require('array-union');

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

arrayUnion(['foo', 'foo', 'bar']);
//=> ['foo', 'bar']

arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
//=> ['🐱', '🦄', '🐻', '🌈']

arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']

License

MIT © Sindre Sorhus

Owners

Authors

Sindre Sorhus (sindresorhus@gmail.com)

License

MIT

Keywords

array, set, uniq, unique, duplicate, remove, union, combine, merge

Info

31 total downloads
17 downloads for version 2.1.0
Download (1.57 KB)

Dependencies (dev)

ava@^1.4.1, tsd@^0.7.2, xo@^0.24.0

Package history

Version Size Last updated Downloads Mirrored?
3.0.1 1.81 KB Mon, 22 Mar 2021 14:03:35 GMT 0
3.0.0 1.81 KB Mon, 01 Mar 2021 13:42:21 GMT 0
2.1.0 1.57 KB Fri, 02 Oct 2020 14:51:34 GMT 17
1.0.2 1.44 KB Fri, 05 Mar 2021 13:09:41 GMT 14