Package Exports
- unique-concat
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 (unique-concat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
unique-concat 
Concatenates two arrays, removing duplicates in the process and returns one array with unique values.
var concat = require('unique-concat');
var res = concat([ 1, 2, 3 ], [ 1, 2, 3, 4, 5, 6])
console.log(res);
// => [1, 2, 3, 4, 5, 6]
Installation
npm install unique-concat
Note
Works only with types that can be properly hashed, which means that they need to have a sensible .toString()
implementation
Types that work as expected: int
, string
Types that work with caveats: float
(if one float is part of the array, all numbers are converted to string)
Types that don't work: object
since obj.toString === '[ object ]'
for all objects.
For more information see tests
License
MIT