Checks if arrays have no value in common.
npm install @extra-array/is-disjoint-onChecks if arrays have no value in common. [:running:] [:vhs:] [:package:] [:moon:]
> Alternatives: [compare], [map].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
``javascript`
array.isDisjointOn(x, y, [fn], [ths]);
// x: an array
// y: another array
// fn: map function (v, i, x)
// ths: this argument
`javascript
const array = require('extra-array');
var x = [1, 2, 3, 4];
array.isDisjointOn(x, [2, 5]);
// false
array.isDisjointOn(x, [-2, -5]);
// true
array.isDisjointOn(x, [-2, -5], v => Math.abs(v));
// false
``
- Data.Set.disjoint(): Haskell
- Set.isdisjoint(): Python
[compare]: https://github.com/nodef/extra-array/wiki/isDisjoint
[map]: https://github.com/nodef/extra-array/wiki/isDisjointOn
[:running:]: https://npm.runkit.com/@extra-array/is-disjoint-on
[:package:]: https://www.npmjs.com/package/@extra-array/is-disjoint-on
[:moon:]: https://www.npmjs.com/package/@extra-array/is-disjoint-on.min
[:vhs:]: https://asciinema.org/a/319373