1.0.0 • Published 7 years ago

arr-intersection v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

arr-intersection Build Status

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]