npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@sets/intersection

1.0.1

@chrisdickinson

npmHomeRepoSnykSocket
Downloads:14
$ npm install @sets/intersection
DailyWeeklyMonthlyYearly

@sets/intersection

Return the intersection between two sets.

const intersection = require('@sets/intersection')

console.log(intersection(
  new Set('hello'),
  new Set('world')
)) // "lo"

Installation

$ npm install --save @sets/intersection

API

intersection(lhs, rhs) -> Set

Return the intersection between the sets represented by lhs and rhs. The resulting set will contain all elements that appear in both lhs and rhs.

License

MIT