Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
forOwn(current, function (value, key) {
var val = target[key]
// add the missing property, or allow a null property to be updated
if (val == null) {
target[key] = value
} else if (isObject(val) && isObject(value)) {
target[key] = defaultsDeep(val, value)
}
})
}