MCPcopy
hub / github.com/lodash/lodash / assignMergeValue

Function assignMergeValue

lodash.js:2501–2506  ·  view source on GitHub ↗

* This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign.

(object, key, value)

Source from the content-addressed store, hash-verified

2499 * @param {*} value The value to assign.
2500 */
2501 function assignMergeValue(object, key, value) {
2502 if ((value !== undefined && !eq(object[key], value)) ||
2503 (value === undefined && !(key in object))) {
2504 baseAssignValue(object, key, value);
2505 }
2506 }
2507
2508 /**
2509 * Assigns `value` to `key` of `object` if the existing value is not equivalent

Callers 2

baseMergeFunction · 0.85
baseMergeDeepFunction · 0.85

Calls 2

eqFunction · 0.85
baseAssignValueFunction · 0.85

Tested by

no test coverage detected