Skip to content

isDisjoint

Subhajit Sahu edited this page Jun 18, 2020 · 14 revisions

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

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

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

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

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

references

Clone this wiki locally