LRU Memoization Utility
JSON →`lru-memoize` is a utility library for JavaScript and TypeScript that provides simple memoization for pure functions using an LRU (Least Recently Used) cache. It helps optimize performance by storing results of expensive function calls and returning the cached result when the same inputs occur again. The current stable version is 1.1.0, released recently with bug fixes and explicit TypeScript/Flow support. The package features a configurable cache limit, custom equality comparison functions, and an option for deep object comparison for arguments, making it flexible for various use cases. Its primary differentiation lies in its minimalist approach to LRU caching for functions, focusing on purity and avoiding side effects. The release cadence appears to be driven by bug fixes and improvements rather than frequent new features, ensuring stability over rapid, breaking changes.
Traffic · last 30 days ↑150% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇺🇦 Ukraine · 🇩🇪 Germany