thunky
JSON →Delay the evaluation of a paramless async function and cache the result. Version 1.1.0 is stable with no active development. It provides a simple thunk pattern for lazy initialization, caching the result after the first successful invocation. Supports both callback and Promise (via `thunky/promise`) styles. Lightweight with zero dependencies. Differentiators: minimal API, error handling that prevents caching on failure, and compatibility with Node.js and browsers via bundlers.
Resources
packagethunky ↗