Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_baseUpdate.js 605B

123456789101112131415161718
  1. var baseGet = require('./_baseGet'),
  2. baseSet = require('./_baseSet');
  3. /**
  4. * The base implementation of `_.update`.
  5. *
  6. * @private
  7. * @param {Object} object The object to modify.
  8. * @param {Array|string} path The path of the property to update.
  9. * @param {Function} updater The function to produce the updated value.
  10. * @param {Function} [customizer] The function to customize path creation.
  11. * @returns {Object} Returns `object`.
  12. */
  13. function baseUpdate(object, path, updater, customizer) {
  14. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  15. }
  16. module.exports = baseUpdate;