123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
-
-
- 'use strict';
-
- var hasOwn = Object.prototype.hasOwnProperty;
-
-
-
- module.exports = MapCache;
-
-
-
- function MapCache(data) {
- this.__data__ = data || {};
- }
-
-
-
- MapCache.prototype.set = function mapSet(key, value) {
- if (key !== '__proto__') {
- this.__data__[key] = value;
- }
- return this;
- };
-
-
-
- MapCache.prototype.get = function mapGet(key) {
- return key === '__proto__' ? undefined : this.__data__[key];
- };
-
-
-
- MapCache.prototype.has = function mapHas(key) {
- return key !== '__proto__' && hasOwn.call(this.__data__, key);
- };
-
-
-
- MapCache.prototype.del = function mapDelete(key) {
- return this.has(key) && delete this.__data__[key];
- };
|