Syllabus/themes/sandpoints/node_modules/array-union
Marcell Mars fd78b9e4e3 initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
..
index.d.ts initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
index.js initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
license initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
package.json initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
readme.md initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00

readme.md

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