deno.land / x / lodash@4.17.19 / npm-package / _customDefaultsAssignIn.js

_customDefaultsAssignIn.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var eq = require('./eq');
/** Used for built-in method references. */var objectProto = Object.prototype;
/** Used to check objects for own properties. */var hasOwnProperty = objectProto.hasOwnProperty;
/** * Used by `_.defaults` to customize its `_.assignIn` use to assign properties * of source objects to the destination object for all destination properties * that resolve to `undefined`. * * @private * @param {*} objValue The destination value. * @param {*} srcValue The source value. * @param {string} key The key of the property to assign. * @param {Object} object The parent object of `objValue`. * @returns {*} Returns the value to assign. */function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined || (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { return srcValue; } return objValue;}
module.exports = customDefaultsAssignIn;
lodash

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉