A caching layer for postinstall script modules used in Node.js package development. Current stable version is 0.7.0, with updates released as needed. It provides a simple cache to avoid redundant execution of 'postinstall' scripts (such as postinstall-js, postinstall-css, postinstall-browserify). Key differentiators: lightweight, zero dependencies, focuses solely on caching for the specific postinstall ecosystem. Compared to generic build caches, it is purpose-built for the postinstall pipeline.
npm install postinstall-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: import default, create cache, and use get/set with async operations.
Always convert keys to strings before using get/set.
Implement manual eviction or use a time-to-live wrapper if temporary caching is needed.
Use postinstallCache() as a function call, not a constructor.
Remove 'new' keyword: const cache = postinstallCache();
Use dynamic import: import('postinstall-cache') or convert project to ESM.Ensure keys are strings: cache.get(String(key)) or cache.set(String(key), value).
No dependency data recorded yet.