# array-intersection

> Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.

Latest version **0.1.2** (published 2015-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-intersection
pnpm add array-intersection
yarn add array-intersection
bun add array-intersection
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-05-08 |
| First published | 2014-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | arr, array, arrays, diff, difference, intersect, intersection, javascript, node.js, uniq, unique, util, utility, utils |

## Links

- npm: https://www.npmjs.com/package/array-intersection
- Repository: https://github.com/jonschlinkert/array-intersection
- Issues: https://github.com/jonschlinkert/array-intersection/issues
- npm.io page: https://npm.io/package/array-intersection

## Dependencies (5)

- [index-of](https://npm.io/package/index-of.md) ^0.1.1
- [array-every](https://npm.io/package/array-every.md) ^0.1.2
- [array-slice](https://npm.io/package/array-slice.md) ^0.2.3
- [array-unique](https://npm.io/package/array-unique.md) ^0.2.1
- [filter-array](https://npm.io/package/filter-array.md) ^0.2.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-05-08
- 0.1.1 — 2014-12-12
- 0.1.0 — 2014-12-12

## README

# array-intersection [![NPM version](https://badge.fury.io/js/array-intersection.svg)](http://badge.fury.io/js/array-intersection)

> Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.

Based on [mout's](http://moutjs.com/) implementation of `intersection`.

## Install

**Install with NPM**

Install with [npm](https://www.npmjs.com/)

```bash
npm i array-intersection --save
```

**Install with Bower**

Install with [bower](http://bower.io/)

```bash
bower install array-intersection --save
```

## Usage

```js
var intersection = require('array-intersection');

intersection(['a', 'a', 'c'])
//=> ['a', 'c']

intersection(['a', 'b', 'c'], ['b', 'c', 'e'])
//=> ['b', 'c']

intersection(['a', 'b', 'c'], ['b', 'c', 'e'], ['b', 'c', 'e'])
//=> ['b', 'c']
```

## Related projects

* [array-every](https://github.com/jonschlinkert/array-every): Returns true if the callback returns truthy for all elements in the given array.
* [array-slice](https://github.com/jonschlinkert/array-slice): Array-slice method. Slices `array` from the `start` index up to, but not including, the `end`… [more](https://github.com/jonschlinkert/array-slice)
* [array-unique](https://github.com/jonschlinkert/array-unique): Return an array free of duplicate values. Fastest ES5 implementation.
* [arr-union](https://github.com/jonschlinkert/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union)
* [filter-array](https://github.com/jonschlinkert/filter-array): Iterates over the elements in an array, returning an array with only the elements for… [more](https://github.com/jonschlinkert/filter-array)
* [index-of](https://github.com/jonschlinkert/index-of): Get the index of the first element in an array that returns truthy for the… [more](https://github.com/jonschlinkert/index-of)

## Running tests

Install dev dependencies:

```bash
npm i -d && npm test
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/array-intersection/issues/new)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license.

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 07, 2015._

---
_Source: https://npm.io/package/array-intersection · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
