super-merge
v1.0.0
Published
Merge everything
Downloads
7
Readme
super-merge
Installation
$ npm install super-merge --save
Usage
import superMerge from 'super-merge'
const target = {
str: 'string',
obj: {
nl: null,
bool: true,
arr: [ ]
},
arr: [
{
bool: true,
str: 'string'
},
{
numb: 5,
obj: { },
str: 'string'
}
]
}
const receive = {
str: null,
obj: {
bool: {
num: 5
}
},
arr: [
'string',
{
obj: {
bool: true
}
}
]
}
superMerge(target, receive)
/*
// target
{
str: null,
obj: {
nl: null,
bool: {
num: 5
},
arr: [ ]
},
arr: [
'string',
{
numb: 5,
obj: {
bool: true
},
str: 'string'
}
]
}
*/