MapLRU
JSON →An LRU cache implementation that is API-compatible with ES6 Map, allowing drop-in replacement for caching with limited memory usage. Version 2.1.0 is current, with stable releases via npm. It supports Node.js >=12 and ships TypeScript type definitions. Unlike many LRU caches, MapLRU mimics the Map interface exactly, enabling use of standard methods like set, get, has, delete, clear, keys, values, entries, and forEach. It also adds extra methods: peek (retrieve without marking as used), last (last accessed key), and keysAccessed (ordered keys). It is lightweight, has no dependencies, and is licensed under Unlicense.
Resources
packagemap-lru ↗