JSPM

array-intersect

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6136
  • Score
    100M100P100Q164306F
  • License MIT

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

array-intersect on Travis array-intersect on NPM array-intersect Downloads on NPM Standard JavaScript Style

Install

$ npm i array-intersect --save

Use

Pass any number of arrays as arguments.

Expects that:

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