object-property-replacer
v1.0.0
Published
A Node.js module to replace the properties of an object by the properties of another object
Downloads
13
Maintainers
Readme
object-property-replacer
A Node.js module to replace the properties of an object by the properties of another object
Installation
Install using npm:
npm install -S object-property-replacer
Usage
Replace the properties of a destination object by the properties of a source object:
const replacer = require('object-property-replacer');
const destination = {
'id': 1,
'email': '[email protected]',
'password': '123456',
};
const source = {
'id': 1,
'email': '[email protected]',
'role': 'user',
};
replacer.replace(destination, source);
// destination = {'id': 1, 'email': '[email protected]', 'role': 'user'}
License
object-property-replacer
is released under the MIT license.