cache-path

JSON →
library 4.0.11 ·javascript
verified Jun 7, 2026

A drop-in alternative to find-cache-dir that returns a cache directory path in any environment, even outside a module/package folder. Version 4.0.11, maintained in a monorepo with TypeScript types included. Key differentiators: (1) never fails when not inside a module/package, (2) customizable priority order for cache path discovery, (3) async API available. Supports both ESM and CommonJS, with normalized name generation for scoped packages.