whitelist-merge
v1.0.0 merge whitelist
whitelist-merge
Merge 2 objects including only properties from supplied whitelist array
Installation
npm install whitelist-merge --save
Usage
const object1 = {name: 'bob', gender: 'male'}
const object2 = {age: 23, weight: '2.3'}
const whitelist = ['name', 'age']
merge(object1, object2, whitelist)
// -> {name: 'bob', age: 23}
npm i [email protected]
Metadata
- MIT
- >=4.2.0
- Richard Walker
- released 12/13/2015