intersection source npm
_.intersection([arrays])
Creates an array of unique values that are included in all of the provided
arrays using SameValueZero
for equality comparisons.
Arguments
- [arrays] (...Array)
The arrays to inspect.
Returns (Array)
Returns the new array of shared values.
Example
_.intersection([2, 1], [4, 2], [1, 2]);
// => [2]