Socket
Socket
Sign inDemoInstall

array-union

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 2.0.0

5

index.js
'use strict';
var arrayUniq = require('array-uniq');
module.exports = function () {
return arrayUniq([].concat.apply([], arguments));
module.exports = (...arguments_) => {
return [...new Set([].concat(...arguments_))];
};

72

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc