00001 var mapCacheClear = require('./_mapCacheClear'),
00002 mapCacheDelete = require('./_mapCacheDelete'),
00003 mapCacheGet = require('./_mapCacheGet'),
00004 mapCacheHas = require('./_mapCacheHas'),
00005 mapCacheSet = require('./_mapCacheSet');
00006
00014 function MapCache(entries) {
00015 var index = -1,
00016 length = entries == null ? 0 : entries.length;
00017
00018 this.clear();
00019 while (++index < length) {
00020 var entry = entries[index];
00021 this.set(entry[0], entry[1]);
00022 }
00023 }
00024
00025
00026 MapCache.prototype.clear = mapCacheClear;
00027 MapCache.prototype['delete'] = mapCacheDelete;
00028 MapCache.prototype.get = mapCacheGet;
00029 MapCache.prototype.has = mapCacheHas;
00030 MapCache.prototype.set = mapCacheSet;
00031
00032 module.exports = MapCache;