Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function copy (target, current) {
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)
}
})
}
constructor (plain) {
each(plain, (value, key) => {
this[key] = value
})
Object.defineProperty(this, '__signatures', {
enumerable: false,
writable: true,
})
this.sign()
}