https://github.com/xotic750/array-intersection-x
Creates an array of unique values that are included in all given arrays.
https://github.com/xotic750/array-intersection-x
array browser intersection javascript nodejs
Last synced: 3 months ago
JSON representation
Creates an array of unique values that are included in all given arrays.
- Host: GitHub
- URL: https://github.com/xotic750/array-intersection-x
- Owner: Xotic750
- License: mit
- Created: 2017-08-25T07:46:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:30:42.000Z (about 3 years ago)
- Last Synced: 2025-02-18T21:51:59.837Z (11 months ago)
- Topics: array, browser, intersection, javascript, nodejs
- Language: JavaScript
- Size: 2.85 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## array-intersection-x
Creates an array of unique values that are included in all given arrays.
### `module.exports([...array])` ⇒ array ⏏
This method creates an array of unique values that are included in all given
arrays using SameValueZero for equality comparisons. The order and references
of result values are determined by the first array.
**Kind**: Exported function
**Returns**: array - Returns the new array of intersecting values.
| Param | Type | Description |
| ---------- | ------------------ | ---------------------- |
| [...array] | array | The arrays to inspect. |
**Example**
```js
import intersection from 'array-intersection-x';
console.log(intersection([2, 1], [2, 3])); // => [2]
```