npm install [ --save ] defop
import defop from 'defop'
Meta
- version: 1.1.15
- author: mrzmmr
Parameters
options
Objectdefaults
Object= Object to merge (optional, default{}
)callback
Function= Defaults to function that returns value or error (optional, default{Function}
)
Examples
import defop from 'defop'
let one = { "key1": 1, "key3": 3 }
let two = { "key2": 2, "key3": 4 }
defop(one, two, (error, result) => {
// result => {"key1": 1, "key2": 2, "key3": 3}
})
Returns Object