This repository has been archived on 2020-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
Syllabus/themes/piratecare/node_modules/array-union
Marcell Mars c832f9bfdb hugo stuff... 2020-03-05 05:10:52 +01:00
..
index.d.ts hugo stuff... 2020-03-05 05:10:52 +01:00
index.js hugo stuff... 2020-03-05 05:10:52 +01:00
license hugo stuff... 2020-03-05 05:10:52 +01:00
package.json hugo stuff... 2020-03-05 05:10:52 +01:00
readme.md hugo stuff... 2020-03-05 05:10:52 +01: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