interset
Binary operations for logical sets in our case arrays, although in a future support for upcoming sets maybe added.
API
union
Return a set that is the union of the input sets.
var union = // => [] // => [1, 2] // => [1, 2, 3] // => [1, 2, 3, 4]
intersection
Return a set that is the intersection of the input sets.
// => TypeError: intersection requires at least one argument // => [1] // => [2] // => [] // => ["a"]
difference
Return a set that is the first set without elements of the remaining sets
var difference = // => TypeError: difference requires at least one arguments // => [1, 2, 3] // => [1] // => [2]
Install
npm install interset