UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

13 lines (11 loc) • 276 B
function evictOldest(map, threshold, count) { if (map.size > threshold) { const iter = map.keys(); for (let i = 0; i < count; i++) { const key = iter.next().value; if (key) map.delete(key); } } } export { evictOldest }; //# sourceMappingURL=evictOldest.mjs.map