{"library":"typescript-memoize","type":"library","category":null,"description":"typescript-memoize is a decorator library for TypeScript that enables method and getter memoization, primarily for optimizing performance by caching the results of expensive operations. As of version 1.1.1, it provides `@Memoize` for standard caching and `@MemoizeExpiring` for time-limited caching, which automatically invalidates cached values after a specified duration. The library offers flexibility in how memoization keys are generated, supporting methods without parameters, `get` accessors, and methods where memoization is based on specific parameters or custom hash functions. It's a stable library, though release cadence is not explicitly defined, new versions appear infrequently. Its key differentiator lies in its decorator-based approach, integrating seamlessly with TypeScript classes, and allowing for granular control over cache invalidation via custom hash functions or expiration.","language":"javascript","status":"active","version":"1.1.1","tags":["javascript","typescript","memoize","functional","decorator"],"last_verified":"Wed May 27","install":[{"cmd":"npm install typescript-memoize","imports":["import { Memoize } from 'typescript-memoize';","import { MemoizeExpiring } from 'typescript-memoize';","@Memoize((param1: any, param2: any) => `${param1}-${param2}`)"]},{"cmd":"yarn add typescript-memoize","imports":[]},{"cmd":"pnpm add typescript-memoize","imports":[]}],"homepage":null,"github":"https://github.com/darrylhodgins/typescript-memoize","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/typescript-memoize","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/typescript-memoize/compatibility"}}