mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
16 lines
500 B
JavaScript
16 lines
500 B
JavaScript
import merge from '../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);
|
|
}
|
|
|
|
export default mergeDefaults;
|