An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


Travis status


Dependency status


devDependency status


npm version


jsDelivr hits


bettercodehub score


Coverage Status

## 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]
```