Array AND
Generic array and function which supports equals predicate function.
Install
npm install arr-and
Usage
var and = ; ;//=> [2] ;//=> [3] ;//=> [{id: 2}]
API
and(...arrays, [equalsPredicate])
Creates an array of unique values that is the logical conjuction of the provided arrays.
...arrays
Required
Type: array
Two or more arrays to do AND operation.
equalsPredicate
Type: function
Default: function(a, b) { return a === b; }
Equality function. Should return true if a
and b
items are equal.
License
MIT