array-intersect

0.0.1 • Public • Published

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

/array-intersect/

    Package Sidebar

    Install

    npm i array-intersect

    Weekly Downloads

    8,036

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    3.49 kB

    Total Files

    4

    Last publish

    Collaborators

    • callmecavs