whitelist-merge

1.0.1 • Public • Published

whitelist-merge

Merge 2 objects including only properties from supplied whitelist array

NPM

Media Suite

Build Status

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}

Readme

Keywords

Package Sidebar

Install

npm i whitelist-merge

Weekly Downloads

59

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mediasuite
  • digitalsadhu