arr-intersection
v1.0.0
Published
Get an intersection of multiple arrays and account objects.
Downloads
5
Maintainers
Readme
arr-intersection
Get the intersection of multiple arrays. Works with objects and array of objects etc. (It works!)
Install
$ npm install --save arr-intersection
Usage
const a = { foo: 1, bar: { zoo: 1} }
const b = { foo: 1 }
const c = { foo: 1, bar: 1 }
const in1 = intersection([a, b], [a, c], [a, b, c])
//=> [a]
const in1 = intersection([[a, b], [a, c], [a, b, c]])
//=> [a]