JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 42832104
  • Score
    100M100P100Q223236F
  • License MIT

Create an array of unique values, in order, from the input arrays

Package Exports

  • array-union
  • array-union/index

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-union) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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(['cat', 'unicorn', 'bear'], ['unicorn', 'rainbow']);
//=> ['cat', 'unicorn', 'bear', 'rainbow']

arrayUnion(['cat', 'unicorn'], ['bear', 'unicorn'], ['dog', 'rainbow', 'rainbow']);
//=> ['cat', 'unicorn', 'bear', 'dog', 'rainbow']

License

MIT © Sindre Sorhus