mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
19 lines
605 B
JavaScript
19 lines
605 B
JavaScript
|
var baseGet = require('./_baseGet'),
|
||
|
baseSet = require('./_baseSet');
|
||
|
|
||
|
/**
|
||
|
* The base implementation of `_.update`.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {Object} object The object to modify.
|
||
|
* @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);
|
||
|
}
|
||
|
|
||
|
module.exports = baseUpdate;
|