Gathering detailed insights and metrics for env-paths
Gathering detailed insights and metrics for env-paths
Gathering detailed insights and metrics for env-paths
Gathering detailed insights and metrics for env-paths
@types/env-paths
Stub TypeScript definitions entry for env-paths, which provides its own types definitions
@meewmeew/env-paths
Get paths for storing things like data, config, cache, etc
env-paths-ts
env-paths rewritten for Typescript
env-run-path
add locally installed binaries paths into process.env
Get paths for storing things like data, config, cache, etc
npm install env-paths
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.8
Supply Chain
99.4
Quality
75.6
Maintenance
100
Vulnerability
100
License
JavaScript (89.87%)
TypeScript (10.13%)
Total Downloads
2,420,519,387
Last Day
3,841,987
Last Week
23,564,273
Last Month
97,493,516
Last Year
958,736,743
MIT License
389 Stars
28 Commits
19 Forks
8 Watchers
1 Branches
7 Contributors
Updated on May 06, 2025
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
env-paths@3.0.0
Size
3.18 kB
NPM Version
7.20.3
Node Version
14.17.5
Published on
Aug 27, 2021
Cumulative downloads
Total Downloads
Get paths for storing things like data, config, cache, etc
Uses the correct OS-specific paths. Most developers get this wrong.
$ npm install env-paths
1import envPaths from 'env-paths'; 2 3const paths = envPaths('MyApp'); 4 5paths.data; 6//=> '/home/sindresorhus/.local/share/MyApp-nodejs' 7 8paths.config 9//=> '/home/sindresorhus/.config/MyApp-nodejs'
Note: It only generates the path strings. It doesn't create the directories for you. You could use make-dir
to create the directories.
Type: string
The name of your project. Used to generate the paths.
Type: object
Type: string
Default: 'nodejs'
Don't use this option unless you really have to!
Suffix appended to the project name to avoid name conflicts with native apps. Pass an empty string to disable it.
Directory for data files.
Example locations (with the default nodejs
suffix):
~/Library/Application Support/MyApp-nodejs
%LOCALAPPDATA%\MyApp-nodejs\Data
(for example, C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Data
)~/.local/share/MyApp-nodejs
(or $XDG_DATA_HOME/MyApp-nodejs
)Directory for config files.
Example locations (with the default nodejs
suffix):
~/Library/Preferences/MyApp-nodejs
%APPDATA%\MyApp-nodejs\Config
(for example, C:\Users\USERNAME\AppData\Roaming\MyApp-nodejs\Config
)~/.config/MyApp-nodejs
(or $XDG_CONFIG_HOME/MyApp-nodejs
)Directory for non-essential data files.
Example locations (with the default nodejs
suffix):
~/Library/Caches/MyApp-nodejs
%LOCALAPPDATA%\MyApp-nodejs\Cache
(for example, C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Cache
)~/.cache/MyApp-nodejs
(or $XDG_CACHE_HOME/MyApp-nodejs
)Directory for log files.
Example locations (with the default nodejs
suffix):
~/Library/Logs/MyApp-nodejs
%LOCALAPPDATA%\MyApp-nodejs\Log
(for example, C:\Users\USERNAME\AppData\Local\MyApp-nodejs\Log
)~/.local/state/MyApp-nodejs
(or $XDG_STATE_HOME/MyApp-nodejs
)Directory for temporary files.
Example locations (with the default nodejs
suffix):
/var/folders/jf/f2twvvvs5jl_m49tf034ffpw0000gn/T/MyApp-nodejs
%LOCALAPPDATA%\Temp\MyApp-nodejs
(for example, C:\Users\USERNAME\AppData\Local\Temp\MyApp-nodejs
)/tmp/USERNAME/MyApp-nodejs
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 7/28 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
16.4%
3,841,987
Compared to previous day
Last Week
10.2%
23,564,273
Compared to previous week
Last Month
-2.8%
97,493,516
Compared to previous month
Last Year
75.1%
958,736,743
Compared to previous year