1 /** Used for native method references. */
2 var objectProto = Object.prototype;
4 /** Used to check objects for own properties. */
5 var hasOwnProperty = objectProto.hasOwnProperty;
8 * Used by `_.template` to customize its `_.assign` use.
10 * **Note:** This function is like `assignDefaults` except that it ignores
11 * inherited property values when checking if a property is `undefined`.
14 * @param {*} objectValue The destination object property value.
15 * @param {*} sourceValue The source object property value.
16 * @param {string} key The key associated with the object and source values.
17 * @param {Object} object The destination object.
18 * @returns {*} Returns the value to assign to the destination object.
20 function assignOwnDefaults(objectValue, sourceValue, key, object) {
21 return (objectValue === undefined || !hasOwnProperty.call(object, key))
26 module.exports = assignOwnDefaults;