API/api.medcify.app/node_modules/validator/es/lib/util/merge.js

12 lines
316 B
JavaScript
Raw Normal View History

2022-09-26 06:11:44 +00:00
export default function merge() {
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var defaults = arguments.length > 1 ? arguments[1] : undefined;
for (var key in defaults) {
if (typeof obj[key] === 'undefined') {
obj[key] = defaults[key];
}
}
return obj;
}