_mapCacheClear.js 391 B

123456789101112131415161718192021
  1. import Hash from './_Hash.js';
  2. import ListCache from './_ListCache.js';
  3. import Map from './_Map.js';
  4. /**
  5. * Removes all key-value entries from the map.
  6. *
  7. * @private
  8. * @name clear
  9. * @memberOf MapCache
  10. */
  11. function mapCacheClear() {
  12. this.size = 0;
  13. this.__data__ = {
  14. 'hash': new Hash,
  15. 'map': new (Map || ListCache),
  16. 'string': new Hash
  17. };
  18. }
  19. export default mapCacheClear;