@extra-set/is-disjoint

Checks if sets have no common values. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

Usage no npm install needed!

<script type="module">
  import extraSetIsDisjoint from 'https://cdn.skypack.dev/@extra-set/is-disjoint';
</script>

README

Checks if sets have no common values. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:

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

This is part of package extra-set.


set.isDisjoint(x, y);
// x: a set
// y: another set
const set = require("extra-set");

var x = new Set([1, 2, 3]);
var y = new Set([3, 4]);
set.isDisjoint(x, y);
// false

var y = new Set([4]);
set.isDisjoint(x, y);
// true


References