isDisjoint - nodef/extra-object GitHub Wiki

Check if objects have no common keys.

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

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

var x = {a: 1, b: 2, c: 3};
object.isDisjoint(x, {c: 3, d: 4});
// → false

object.isDisjoint(x, {d: 4});
// → true

References