Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
605 bytes
|
Line | |
---|
1 | var baseGet = require('./_baseGet'),
|
---|
2 | baseSet = require('./_baseSet');
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * The base implementation of `_.update`.
|
---|
6 | *
|
---|
7 | * @private
|
---|
8 | * @param {Object} object The object to modify.
|
---|
9 | * @param {Array|string} path The path of the property to update.
|
---|
10 | * @param {Function} updater The function to produce the updated value.
|
---|
11 | * @param {Function} [customizer] The function to customize path creation.
|
---|
12 | * @returns {Object} Returns `object`.
|
---|
13 | */
|
---|
14 | function baseUpdate(object, path, updater, customizer) {
|
---|
15 | return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
---|
16 | }
|
---|
17 |
|
---|
18 | module.exports = baseUpdate;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.