00001 var listCacheClear = require('./_listCacheClear'),
00002 listCacheDelete = require('./_listCacheDelete'),
00003 listCacheGet = require('./_listCacheGet'),
00004 listCacheHas = require('./_listCacheHas'),
00005 listCacheSet = require('./_listCacheSet');
00006
00014 function ListCache(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 ListCache.prototype.clear = listCacheClear;
00027 ListCache.prototype['delete'] = listCacheDelete;
00028 ListCache.prototype.get = listCacheGet;
00029 ListCache.prototype.has = listCacheHas;
00030 ListCache.prototype.set = listCacheSet;
00031
00032 module.exports = ListCache;