isDisjoint - nodef/extra-map GitHub Wiki

Check if maps have no common keys.

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

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

var x = new Map(['a', 1], ['b', 2], ['c', 3](/nodef/extra-map/wiki/'a',-1],-['b',-2],-['c',-3));
var y = new Map(['c', 3], ['d', 4](/nodef/extra-map/wiki/'c',-3],-['d',-4));
map.isDisjoint(x, y);
// → false

var y = new Map(['d', 4](/nodef/extra-map/wiki/'d',-4));
map.isDisjoint(x, y);
// → true

References