Gathering detailed insights and metrics for replace-homedir
Gathering detailed insights and metrics for replace-homedir
Gathering detailed insights and metrics for replace-homedir
Gathering detailed insights and metrics for replace-homedir
Replace user home in a string with another string. Useful for tildifying a path.
npm install replace-homedir
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
9 Commits
4 Forks
4 Watchers
1 Branches
3 Contributors
Updated on Nov 05, 2023
Latest Version
2.0.0
Package Id
replace-homedir@2.0.0
Unpacked Size
4.55 kB
Size
2.21 kB
File Count
4
NPM Version
7.24.2
Node Version
16.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
7
Replace user home in a string with another string. Useful for tildifying a path.
1var replaceHomedir = require('replace-homedir'); 2 3var shortPath = replaceHomedir('/Users/phated/myProject', '~'); 4// shortPath === '~/myProject'
replaceHomedir(path, replacement)
Takes a string path
as the first argument and a string or function replacement
as the second argument. If the path
is absolute and begins with the User's homedir, the homedir portion of the path is replaced with replacement
using String#replace.
If path
is not a string, the function will throw.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 1/8 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
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 2025-07-07
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