6b85895073bbc4aa3dd0b46f9fa12c1b145611455991aef8b697f81834de11a2cc94980d79bacf5e9858fe3f7b34728dc292d02997de0d31dc20fd229f243f 489 B

12345678910111213141516171819202122
  1. var getMapData = require('./_getMapData');
  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. module.exports = mapCacheSet;