A javascript library for working with objects
Performs a deep comparison of objects and returns a new object of values that are equal in all given objects.
Param | Type | Description |
---|---|---|
args | * , Array |
An array of arrays or arrays as separate args. |
Example
import { intersection } from 'object-agent';
intersection([1, 2, 3], [2, 3, 4], [5, 6, 2, 3]); // => [2, 3]
intersection({
a: 'b',
c: [1, 2, 3],
d: null
}, {
a: 'b',
c: [1, 3, 4]
})
// => { a: 'b', c: [1, 3] }