Skip to content

isDisjoint

Subhajit Sahu edited this page Dec 28, 2022 · 14 revisions

Check if lists have no common keys.

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


function isDisjoint(x, y)
// x: lists
// y: another lists
const xlists = require('extra-lists');

var x = [['a', 'b', 'c'], [1, 2, 3]];
var x = [['c', 'd'], [3, 4]];
xlists.isDisjoint(x, y);
// → false

var x = [['d'], [4]];
xlists.isDisjoint(x, y);
// → true


References