A memoization and method control library for JavaScript/TypeScript, providing decorators for memoize, debounce, throttle, and queue. Version 0.3.16 is the latest stable release. It supports both Node.js and browser environments, includes built-in transport persistence (file, localStorage), and ships TypeScript type definitions. Differentiators include decorator-based API, per-instance caching, promise rejection clearing, and custom cache stores.
npm install memdNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows usage of memoize, debounce, throttle, and queue decorators, plus Cache class.
Add `"experimentalDecorators": true` to your tsconfig.json compilerOptions.
Add `perInstance: true` to the options object: `@deco.memoize({ perInstance: true })`.Specify an explicit millisecond value to avoid reliance on environment-specific behavior.
Use `@deco.queued(...)` instead of `@deco.queue(...)`.
Ensure you have `memd` installed and tsconfig.json includes `"moduleResolution": "node"`. If using bundler, check import path.
Use named imports like `import { deco } from 'memd'` or use `import * as memd from 'memd'` then access `memd.deco`.Add `"experimentalDecorators": true` to your tsconfig.json.
No dependency data recorded yet.