1 | import nativeCreate from './_nativeCreate';
|
2 |
|
3 | /** Used to stand-in for `undefined` hash values. */
|
4 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
5 |
|
6 | /**
|
7 | * Sets the hash `key` to `value`.
|
8 | *
|
9 | * @private
|
10 | * @param {Object} hash The hash to modify.
|
11 | * @param {string} key The key of the value to set.
|
12 | * @param {*} value The value to set.
|
13 | */
|
14 | function hashSet(hash, key, value) {
|
15 | hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
16 | }
|
17 |
|
18 | export default hashSet;
|