array-union
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -1,5 +0,3 @@ | ||
'use strict'; | ||
const arrayUnion = (...arguments_) => [...new Set([...arguments_.flat()])]; | ||
module.exports = (...arguments_) => { | ||
return [...new Set([].concat(...arguments_))]; | ||
}; | ||
export default arrayUnion; |
{ | ||
"name": "array-union", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "Create an array of unique values, in order, from the input arrays", | ||
"license": "MIT", | ||
"repository": "sindresorhus/array-union", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
@@ -34,6 +37,11 @@ "scripts": { | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.38.2" | ||
}, | ||
"tsd": { | ||
"compilerOptions": { | ||
"esModuleInterop": true | ||
} | ||
} | ||
} |
@@ -1,6 +0,5 @@ | ||
# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) | ||
# array-union | ||
> Create an array of unique values, in order, from the input arrays | ||
## Install | ||
@@ -12,7 +11,6 @@ | ||
## Usage | ||
```js | ||
const arrayUnion = require('array-union'); | ||
import arrayUnion from 'array-union'; | ||
@@ -32,5 +30,12 @@ arrayUnion([1, 1, 2, 3], [2, 3]); | ||
--- | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-array-union?utm_source=npm-array-union&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
Sorry, the diff of this file is not supported yet
3595
40
Yes
21