Files
lodash/internal/assignDefaults.js
John-David Dalton fec213a98c Bump to v3.7.0.
2015-12-16 17:49:35 -08:00

20 lines
564 B
JavaScript

define([], function() {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/**
* 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;
}
return assignDefaults;
});