Files
node/tools/node_modules/eslint/node_modules/array-union/readme.md
T
Node.js GitHub Bot ba7505ebd5 tools: update eslint to 8.21.0
PR-URL: https://github.com/nodejs/node/pull/44162
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2022-08-08 00:34:52 +00:00

713 B

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