printer-notifications/node_modules/array-union
2023-11-13 16:10:04 -05:00
..
index.d.ts feat: docker compose maybe 2023-11-13 16:10:04 -05:00
index.js feat: docker compose maybe 2023-11-13 16:10:04 -05:00
license feat: docker compose maybe 2023-11-13 16:10:04 -05:00
package.json feat: docker compose maybe 2023-11-13 16:10:04 -05:00
readme.md feat: docker compose maybe 2023-11-13 16:10:04 -05:00

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