You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
316 B
12 lines
316 B
2 years ago
|
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;
|
||
|
}
|