956a422f926cd5b3b531f217014de9a02f0ba6e1d4c22a0133f679b3d1192b41cbdd6f4b9281d848e9fdbefe49ce58045839e02fb24ef8a94a617436cda4eb 487 B

12345678910111213141516171819202122
  1. import getMapData from './_getMapData.js';
  2. /**
  3. * Sets the map `key` to `value`.
  4. *
  5. * @private
  6. * @name set
  7. * @memberOf MapCache
  8. * @param {string} key The key of the value to set.
  9. * @param {*} value The value to set.
  10. * @returns {Object} Returns the map cache instance.
  11. */
  12. function mapCacheSet(key, value) {
  13. var data = getMapData(this, key),
  14. size = data.size;
  15. data.set(key, value);
  16. this.size += data.size == size ? 0 : 1;
  17. return this;
  18. }
  19. export default mapCacheSet;