package
A simple multi-index cache for JavaScript for objects
npm install @duailibe/micheGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
2.2 kB
Includes dependencies.
A simple multi-index cache for JavaScript for objects
This cache was built for caching specifically functions that receive objects as arguments, thus using the object references as cache keys.
import MultiIndexCache from '@duailibe/miche';
const cachedFn = MultiIndexCache(fn);
// this will be cached
cachedFn(objA, objB, objC);