mirror of https://github.com/lukechilds/node.git
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.
16 lines
505 B
16 lines
505 B
9 years ago
|
var merge = require('../object/merge');
|
||
|
|
||
|
/**
|
||
|
* Used by `_.defaultsDeep` to customize its `_.merge` use.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {*} objectValue The destination object property value.
|
||
|
* @param {*} sourceValue The source object property value.
|
||
|
* @returns {*} Returns the value to assign to the destination object.
|
||
|
*/
|
||
|
function mergeDefaults(objectValue, sourceValue) {
|
||
|
return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
|
||
|
}
|
||
|
|
||
|
module.exports = mergeDefaults;
|