# intersection-of

> Find unique common elements among given arrays

Latest version **1.3.0** (published 2019-07-11) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2019-07-11 |
| First published | 2019-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 6 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nivrith |
| Maintainers | nivrith |
| Keywords | array, array-intersection, common, common-array, elements, fast, intersection, typescript, unique |

## Links

- npm: https://www.npmjs.com/package/intersection-of
- Repository: https://github.com/nivrith/intersection-of
- npm.io page: https://npm.io/package/intersection-of

## Dependencies (6)

- [slim-cache](https://npm.io/package/slim-cache.md) ^1.1.0
- [fast-memoize](https://npm.io/package/fast-memoize.md) ^2.5.1
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^2.0.1
- [lodash.intersection](https://npm.io/package/lodash.intersection.md) ^4.4.0
- [lodash.intersectionby](https://npm.io/package/lodash.intersectionby.md) ^4.7.0
- [lodash.intersectionwith](https://npm.io/package/lodash.intersectionwith.md) ^4.4.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2019-07-11
- 1.2.4 — 2019-06-29
- 1.2.3 — 2019-06-29
- 1.2.2 — 2019-06-29
- 1.2.1 — 2019-06-29
- 1.2.0 — 2019-06-29
- 1.1.0 — 2019-06-29
- 1.0.4 — 2019-06-26
- 1.0.3 — 2019-06-26
- 1.0.2 — 2019-06-26
- 1.0.1 — 2019-06-26

## README

# intersection-of

[![CircleCI](https://circleci.com/gh/nivrith/intersection-of/tree/master.svg?style=svg)](https://circleci.com/gh/nivrith/intersection-of/tree/master)
[![NPM Downloads](https://img.shields.io/npm/dw/intersection-of.svg)](https://www.npmjs.com/package/intersection-of)
[![node](https://img.shields.io/node/v/intersection-of.svg)](https://www.npmjs.com/package/intersection-of)
[![License MIT](https://img.shields.io/github/license/nivrith/intersection-of.svg)](https://github.com/nivrith/intersection-of/blob/master/LICENSE)

Find unique common elements among given arrays

## Highlights

- Super Fast

- Memoized

- Written in Typescript

- Async and Sync methods

- Returns Promise

## Usage

> Get an array of common unique values that are included in all given arrays

```js

// async

const { intersectionOf } = require('intersection-of');

intersectionOf([1,2,2,3,4], [2,3,6,7])
.then((result) => {
  console.log(result); // [2,3]
});


// sync
const { intersectionOfSync }  = require('intersection-of');

let result = intersectionOfSync([1,2,2,3,4], [2,3,6,7]);
console.log(result) // [2,3]

```

## License

MIT © [Nivrith Mandayam Gomatam](https://au.linkedin.com/in/nivrith-gomatam-43bb7aa5)

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