source: trip-planner-front/node_modules/lodash/_assignMergeValue.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 582 bytes
RevLine 
[6a3a178]1var baseAssignValue = require('./_baseAssignValue'),
2 eq = require('./eq');
3
4/**
5 * This function is like `assignValue` except that it doesn't assign
6 * `undefined` values.
7 *
8 * @private
9 * @param {Object} object The object to modify.
10 * @param {string} key The key of the property to assign.
11 * @param {*} value The value to assign.
12 */
13function assignMergeValue(object, key, value) {
14 if ((value !== undefined && !eq(object[key], value)) ||
15 (value === undefined && !(key in object))) {
16 baseAssignValue(object, key, value);
17 }
18}
19
20module.exports = assignMergeValue;
Note: See TracBrowser for help on using the repository browser.