@extra-set/difference
TypeScript icon, indicating that this package has built-in type declarations

2.2.11 • Public • Published

Gives values of set not present in others. 📦 😺 🏃 📼 🌔 📜 📰 📘

Alternatives: difference, difference$.
Similar: union, intersection, difference, symmetricDifference, isDisjoint.

This is part of package extra-set.


set.difference(x, y);
// x: a set
// y: another set
const set = require("extra-set");

var x = new Set([1, 2, 3, 4, 5]);
var y = new Set([2, 4]);
set.difference(x, y);
// Set(3) { 1, 3, 5 }

var y = new Set([2, -4]);
set.difference(x, y);
// Set(4) { 1, 3, 4, 5 }


References

Readme

Keywords

Package Sidebar

Install

npm i @extra-set/difference

Weekly Downloads

7

Version

2.2.11

License

MIT

Unpacked Size

4.62 kB

Total Files

7

Last publish

Collaborators

  • npm