mirror of
https://github.com/nodejs/node.git
synced 2025-08-17 22:58:52 +02:00

PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
13 lines
428 B
JavaScript
13 lines
428 B
JavaScript
/**
|
|
* Used by `_.defaults` to customize its `_.assign` 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 assignDefaults(objectValue, sourceValue) {
|
|
return objectValue === undefined ? sourceValue : objectValue;
|
|
}
|
|
|
|
module.exports = assignDefaults;
|