← All repos

memoize

Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical input

Browse cluster: Terminal & CLI Output Styling
106commits
20contributors
1languages

Tech stack & purpose

Memoize is a JavaScript library that implements function memoization, an optimization technique that speeds up consecutive function calls by caching results for identical inputs. The package automatically manages memory by releasing cached items when they expire or when the cache is manually cleared. It provides flexible caching strategies through configurable options like `maxAge` for cache expiration and `cacheKey` for determining how arguments map to cache entries, and includes a decorator for memoizing class methods and getters. The project is maintained by Sindre Sorhus and published as an npm package.

Community & reference links

Languages

TypeScript
100.0%

Contributors