cache-directory

JSON →
library 2.0.0 ·javascript maintenance
verified Jun 7, 2026

A lightweight utility (v2.0.0, last updated ~2017) to determine the correct OS-specific cache directory (XDG on Linux, ~/Library/Caches on macOS, LocalAppData on Windows). Minimal API with one synchronous function. Unlike xdg-based-cache or find-cache-dir, this module has no dependencies and works on older Node.js (>=4). Released under LGPL 3.0+.