Get the user home directory with fallback to the system temp directory
Installations
npm install home-or-tmp
Developer Guide
Typescript
No
Module System
ESM
Min. Node Version
>=12
Node Version
12.22.1
NPM Version
6.14.10
Score
99.5
Supply Chain
61.2
Quality
75.3
Maintenance
100
Vulnerability
100
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
sindresorhus
Download Statistics
Total Downloads
1,155,782,068
Last Day
305,723
Last Week
1,390,902
Last Month
6,898,778
Last Year
98,952,594
GitHub Statistics
30 Stars
13 Commits
4 Forks
8 Watching
1 Branches
2 Contributors
Bundle Size
273.00 B
Minified
201.00 B
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
4.0.0
Package Id
home-or-tmp@4.0.0
Size
1.67 kB
NPM Version
6.14.10
Node Version
12.22.1
Publised On
16 Apr 2021
Total Downloads
Cumulative downloads
Total Downloads
1,155,782,068
Last day
-3.3%
305,723
Compared to previous day
Last week
-16.6%
1,390,902
Compared to previous week
Last month
-1.6%
6,898,778
Compared to previous month
Last year
-7.4%
98,952,594
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
home-or-tmp
Get the user home directory with fallback to the system temp directory
Useful in cases where the home directory either isn't set or doesn't exist.
Install
$ npm install home-or-tmp
Usage
1import homeOrTemp from 'home-or-tmp'; 2 3console.log(homeOrTemp); 4//=> '/Users/sindresorhus' 5 6// And if there is no home directory: 7 8console.log(homeOrTemp); 9//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T'
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy file detected: .github/security.md:1
- Info: Found linked content: .github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/security.md:1
- Info: Found text in security policy: .github/security.md:1
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/13 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/home-or-tmp/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/home-or-tmp/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:21
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
4.1
/10
Last Scanned on 2025-01-20
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