Skip to content

isDisjoint

Subhajit Sahu edited this page Jun 11, 2020 · 12 revisions

Checks if objects have no common keys. 🏃 📼 📦 🌔 📒

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

object.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