@extra-iterable/is-disjoint-on

Checks if iterables have no value in common. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:] > Alternatives: [compare], [map]. > This is part of package extra-iterable.

Usage no npm install needed!

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

README

Checks if iterables have no value in common. :running: :vhs: :package: :moon: :ledger:

Alternatives: compare, map.
This is part of package extra-iterable.

iterable.isDisjointOn(x, y, [fn], [ths]);
// x:   an iterable
// y:   another iterable
// fn:  map function (v, i, x)
// ths: this argument
const iterable = require('extra-iterable');

var x = [1, 2, 3, 4];
iterable.isDisjointOn(x, [2, 5]);
// false

iterable.isDisjointOn(x, [-2, -5]);
// true

iterable.isDisjointOn(x, [-2, -5], v => Math.abs(v));
// false

references