* A specialized version of `_.assign` for customizing assigned values without * support for argument juggling, multiple sources, and `this` binding `customizer` * functions. * * @private * @param {Object} object The destination object. * @param {Object} source The sourc
(object, source, customizer)
| 3115 | * @returns {Object} Returns `object`. |
| 3116 | */ |
| 3117 | function assignWith(object, source, customizer) { |
| 3118 | var props = keys(source); |
| 3119 | push.apply(props, getSymbols(source)); |
| 3120 | |
| 3121 | var index = -1, |
| 3122 | length = props.length; |
| 3123 | |
| 3124 | while (++index < length) { |
| 3125 | var key = props[index], |
| 3126 | value = object[key], |
| 3127 | result = customizer(value, source[key], key, object, source); |
| 3128 | |
| 3129 | if ((result === result ? (result !== value) : (value === value)) || |
| 3130 | (value === undefined && !(key in object))) { |
| 3131 | object[key] = result; |
| 3132 | } |
| 3133 | } |
| 3134 | return object; |
| 3135 | } |
| 3136 | |
| 3137 | /** |
| 3138 | * The base implementation of `_.assign` without support for argument juggling, |
no test coverage detected