-
Notifications
You must be signed in to change notification settings - Fork 5
isDisjoint
Subhajit Sahu edited this page Mar 17, 2020
·
25 revisions
Checks if arrays have no value in common.
array.isDisjoint(x, y, [fn]);
// x: an array
// y: another array
// fn: compare function (a, b)
// --> true if disjoint
const array = require('extra-array');
var a = [1, 2, 3, 4];
array.isInfix(a, [1, 2, 3]);
// true
array.isInfix(a, [2, 3]);
// true
array.isInfix(a, [3, 2]);
// false