intersect-objects
v2.0.0
Published
The intersect-objects module help you with creating object intersection.
Downloads
103
Maintainers
Readme
intersect-objects
The intersect-objects module help you with creating object intersection.
Installation
You can add the intersect-objects to your project.
npm i intersect-objects
Usage
import { intersectObjects } from 'intersect-objects';
const object1 = { a: 'a', b: 'b', c: 'c' }
const object2 = { a: 'a', b: 'x' }
intersectObjects(object1, object2) // { a: 'a', b: 'x' }
// intersectObjects(...spread)
intersectObjects() // {}
intersectObjects(undefined) // TypeError
intersectObjects(null) // TypeError
intersectObjects(false) // TypeError
intersectObjects(1) // TypeError