intersect-objects

1.0.0 • Public • Published

intersect-objects

Build Status Dependency Status Coverage Status

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
 

Package Sidebar

Install

npm i intersect-objects

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

49.3 kB

Total Files

13

Last publish

Collaborators

  • mjancarik