README
Merge multiple Javascript objects
Deep merge any number of javascript objects.
install
npm install smart-merge
Usage
var baseStyles = {
header: {
left: 10,
position: 'absolute',
},
footer: {
right: 10
}
};
var rtlStyles = {
header: {
left: 40,
}
};
var merge = require('smart-merge');
merge(baseStyles, rtlStyles);
Result
{
header:{
left: 40,
position: 'absolute'
},
footer:{
right: 10
}
}
Tests
Check the tests for more examples...