SIGN IN SIGN UP

A modern JavaScript utility library delivering modularity, performance, & extras.

0 0 51 JavaScript
2016-02-29 23:38:21 -08:00
define(['./_baseGet', './_baseSet'], function(baseGet, baseSet) {
/**
* The base implementation of `_.update`.
*
* @private
2016-08-11 23:27:31 -07:00
* @param {Object} object The object to modify.
2016-02-29 23:38:21 -08:00
* @param {Array|string} path The path of the property to update.
* @param {Function} updater The function to produce the updated value.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
}
return baseUpdate;
});