env-paths
JSON →Small library to retrieve OS-specific paths for storing data, config, cache, logs, and temp files. Version 4.0.0 requires Node >=20, ships TypeScript definitions, and is ESM-only. Correctly implements XDG Base Directory (Linux), macOS conventions, and Windows %APPDATA%/%LOCALAPPDATA%. Unlike ad-hoc path joining, env-paths avoids common portability mistakes. Published by Sindre Sorhus; stable API with infrequent updates.
Resources
packageenv-paths ↗