UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

20 lines (19 loc) 686 B
import mapCacheClear from "./_mapCacheClear.mjs"; import mapCacheDelete from "./_mapCacheDelete.mjs"; import mapCacheGet from "./_mapCacheGet.mjs"; import mapCacheHas from "./_mapCacheHas.mjs"; import mapCacheSet from "./_mapCacheSet.mjs"; function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } MapCache.prototype.clear = mapCacheClear; MapCache.prototype["delete"] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; export { MapCache as default };