array-union
Advanced tools
Comparing version 1.0.2 to 2.0.0
'use strict'; | ||
var arrayUniq = require('array-uniq'); | ||
module.exports = function () { | ||
return arrayUniq([].concat.apply([], arguments)); | ||
module.exports = (...arguments_) => { | ||
return [...new Set([].concat(...arguments_))]; | ||
}; |
{ | ||
"name": "array-union", | ||
"version": "1.0.2", | ||
"description": "Create an array of unique values, in order, from the input arrays", | ||
"license": "MIT", | ||
"repository": "sindresorhus/array-union", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"array", | ||
"arr", | ||
"set", | ||
"uniq", | ||
"unique", | ||
"duplicate", | ||
"remove", | ||
"union", | ||
"combine", | ||
"merge" | ||
], | ||
"dependencies": { | ||
"array-uniq": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
"name": "array-union", | ||
"version": "2.0.0", | ||
"description": "Create an array of unique values, in order, from the input arrays", | ||
"license": "MIT", | ||
"repository": "sindresorhus/array-union", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"array", | ||
"set", | ||
"uniq", | ||
"unique", | ||
"duplicate", | ||
"remove", | ||
"union", | ||
"combine", | ||
"merge" | ||
], | ||
"devDependencies": { | ||
"ava": "^1.3.1", | ||
"xo": "^0.24.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) | ||
``` | ||
$ npm install --save array-union | ||
$ npm install array-union | ||
``` | ||
@@ -22,4 +22,10 @@ | ||
arrayUnion(['foo', 'foo', 'bar'], ['foo']); | ||
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'] | ||
``` | ||
@@ -26,0 +32,0 @@ |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2545
0
35
4
- Removedarray-uniq@^1.0.1
- Removedarray-uniq@1.0.3(transitive)