dif

@sets/difference

return the difference between two sets

Showing:

Popularity

Downloads/wk

3

Maintenance

No Maintenance Data Available

Package

Dependencies

2

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

@sets/difference

Return the difference between two sets, or the symmetric difference between two sets.

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

console.log(difference(
  new Set('hello'),
  new Set('world'))
)) // "he"

console.log(difference.symmetric(
  new Set('hello'),
  new Set('world'))
)) // "hewrd"

Installation

$ npm install --save @sets/difference

API

difference(lhs, rhs) -> Set

Return the difference between the sets represented by lhs and rhs. The resulting set will contain all elements from lhs that do not appear in rhs.

difference.symmetric(lhs, rhs) -> Set

Return the symmetric difference between the sets represented by lhs and rhs. The resulting set will contain all elements from lhs that do not appear in rhs and all elements from rhs that do not appear in lhs.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100