-
Notifications
You must be signed in to change notification settings - Fork 1
isDisjoint
Subhajit Sahu edited this page Jun 13, 2020
·
17 revisions
Checks if sets have no common values. 🏃 📼 📦 🌔 📒
Similar: union, intersection, difference, symmetricDifference, isDisjoint.
set.isDisjoint(x, y);
// x: a set
// y: another set
const set = require('extra-set');
var x = new Set([1, 2, 3]);
var y = new Set([3, 4]);
set.isDisjoint(x, y);
// false
var y = new Set([4]);
set.isDisjoint(x, y);
// true