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
Get paths for storing things like data, config, cache, etc
npm install env-paths
99.4
Supply Chain
99.4
Quality
75.6
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
381 Stars
28 Commits
16 Forks
8 Watching
1 Branches
7 Contributors
Updated on 09 Nov 2024
Minified
Minified + Gzipped
JavaScript (89.87%)
TypeScript (10.13%)
Cumulative downloads
Total Downloads
Last day
-18.7%
2,995,421
Compared to previous day
Last week
-4%
19,153,095
Compared to previous week
Last month
2.9%
82,941,490
Compared to previous month
Last year
60.9%
760,341,236
Compared to previous year
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
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 7/28 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
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 2024-11-18
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 More