intersection-of

Find unique common elements among given arrays

MIT 11 个版本
安装
npm install intersection-of
yarn add intersection-of
pnpm add intersection-of
bun add intersection-of
README

intersection-of

CircleCI NPM Downloads node License MIT

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


// 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

版本列表
1.3.0 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