Skip to content

isDisjoint

Subhajit Sahu edited this page Dec 8, 2022 · 12 revisions

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

Clone this wiki locally