73c67b6988782222f8ed3b5d515353044c29179e1b99d7db95eb9401ff95cb2ca424fe39396f4d22744ce735cdaee0e5ba5c662d85675705a1501eae9d38d4 596 B

1234567891011121314151617181920212223
  1. import nativeCreate from './_nativeCreate.js';
  2. /** Used to stand-in for `undefined` hash values. */
  3. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  4. /**
  5. * Sets the hash `key` to `value`.
  6. *
  7. * @private
  8. * @name set
  9. * @memberOf Hash
  10. * @param {string} key The key of the value to set.
  11. * @param {*} value The value to set.
  12. * @returns {Object} Returns the hash instance.
  13. */
  14. function hashSet(key, value) {
  15. var data = this.__data__;
  16. this.size += this.has(key) ? 0 : 1;
  17. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  18. return this;
  19. }
  20. export default hashSet;