@extra-set/difference
v2.2.11
Published
Gives values of set not present in others.
Downloads
209
Readme
Gives values of set not present in others. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
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 }