@oceans/indexdb
Version:
oceans indexdb
20 lines (17 loc) • 359 B
JavaScript
exports.merge = (source, target, isSkipEmptyValue) => {
const t = {}
for (const k in source) {
if (typeof target[k] !== 'undefined') {
t[k] = target[k]
} else {
if (source[k] === '_false_') {
if (!isSkipEmptyValue) {
t[k] = source[k]
}
} else {
t[k] = source[k]
}
}
}
return t
}