npm-cache-env

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

Small utility (v2.0.0, 2018) to retrieve the npm cache folder path from environment variables (e.g., npm_config_cache). Case-insensitive lookup of npm config environment variables; returns null if not set. Always resolves relative paths to absolute. No dependencies. Good for tooling that needs to locate npm cache without invoking npm CLI. Last release stable; no recent updates.