Package Exports
- array-intersect
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-intersect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
array-intersect
Install
$ npm i array-intersect --save
Use
Pass any number of arrays as arguments.
Expects that:
- Array items are unique (deduped)
- Array items are primitive types
import intersect from 'array-intersect'
const simple = intersect(
[1, 2, 3],
[2, 3, 4]
)
const complex = intersect(
[0, 1, 2, 3],
[1, 2, 3, 4],
[2, 3, 4, 5]
)
console.log(simple) // [2, 3]
console.log(complex) // [2, 3]
Browser Support
Requires support for ES5 Array Methods.
License
MIT. © 2018 Michael Cavalea