A minimal utility to cache the return value of a function based on its arguments. v0.0.1 is pre-1.0.0 with an unstable API. It provides a simple way to memoize function calls with an optional custom hash function and a .refresh method to bypass cache. No dependencies. Not actively maintained; last update long ago.
npm install cachewrapNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to wrap a function with cachewrap and use forced refresh via the .refresh method.
Consider alternatives like memoizee or lodash.memoize.
Pass a custom hash function that handles deep equality or serialization properly.
If you need cache expiry, use a different library like memoizee.
Pin to exact version in package.json: 'cachewrap': '0.0.1'
Use 'import createCacheWrap from "cachewrap"' or 'const createCacheWrap = require("cachewrap")'Run 'npm install cachewrap' and ensure path is exactly 'cachewrap'.
Provide a custom hash function that serializes objects (e.g., JSON.stringify).
No dependency data recorded yet.