Gathering detailed insights and metrics for gentle-path-truncate
Gathering detailed insights and metrics for gentle-path-truncate
Gathering detailed insights and metrics for gentle-path-truncate
Gathering detailed insights and metrics for gentle-path-truncate
npm install gentle-path-truncate
Typescript
Module System
Node Version
NPM Version
67.4
Supply Chain
77.6
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
3,375
Last Day
10
Last Week
95
Last Month
200
Last Year
1,596
2 Stars
8 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.0.4
Package Id
gentle-path-truncate@0.0.4
Unpacked Size
5.21 kB
Size
2.09 kB
File Count
5
NPM Version
6.4.1
Node Version
10.11.0
Cumulative downloads
Total Downloads
Last day
100%
10
Compared to previous day
Last week
48.4%
95
Compared to previous week
Last month
46%
200
Compared to previous month
Last year
638.9%
1,596
Compared to previous year
17
This robust library is built to gently cut (truncate) path strings.
The function truncatePath(path, maxlen, [ellipsis])
accepts three arguments:
path
- a string which is a path itselfmaxlen
- a maximum length of resulting stringellipsis
- an ellipsis which has a default value of ...
This function is removing parts of a path one at a time putting the ellipsis
in instead.
In case if even showing a single path item is over the maxlen
it just results in something like this .../filename.js
. In case a file name is too long to be shown it gets truncated too.
In that case this: plugin/connect/modules/beans/filenameWhichIsSuperLongAndWayLongerThanItShouldBe.json
will result into this .../filenameWhichI...ThanItShouldBe.json
.
This library also handles files without extention, files with multiple edxtentions (e.g. *.min.js
and hidden files .gitignore
).
1npm i gentle-path-truncate
1import truncatePath from 'gentle-path-truncate'
or in Common.js
1const truncatePath = require('gentle-path-truncate')
1npm test
1npm run build 2npm version 3npm publish
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/8 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
64 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-03
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