paulpaterson_obsidian-proje.../node_modules/array-union
2024-11-02 14:49:26 -05:00
..
index.d.ts Initial commit of PoC code 2024-11-02 14:49:26 -05:00
index.js Initial commit of PoC code 2024-11-02 14:49:26 -05:00
license Initial commit of PoC code 2024-11-02 14:49:26 -05:00
package.json Initial commit of PoC code 2024-11-02 14:49:26 -05:00
readme.md Initial commit of PoC code 2024-11-02 14:49:26 -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