Skip to content

zarkoselak/object-deep-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

object-deep-update 🙌

Build Status npm version

Updates ONLY existing properties!!

Example

var updateObj = require('object-deep-update');

var obj1 = {
	t: 'test1',
	te: {
		t: tt,
		e: ee
	},
	ff: ['tt', 'ee', 'te']
};

var obj2 = {
	t: 'test2',
	te: {
		t: xx,
		e: yy
	},
	ff: ['xx', 'yy', 'zz'],
	qq: 'omg!'
};

var result = updateObj(obj1, obj2);

{
	t: 'test2',
	te: {
		t: xx,
		e: yy
	},
	ff: ['xx', 'yy', 'zz']
}

Test

npm test

License

MIT © Zarko Selak

Releases

No releases published

Packages

No packages published