Installations
npm install truncate-logs
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
6.9.1
NPM Version
3.10.8
Score
63.8
Supply Chain
68.9
Quality
73
Maintenance
100
Vulnerability
98.2
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
maxogden
Download Statistics
Total Downloads
3,816
Last Day
1
Last Week
4
Last Month
21
Last Year
286
GitHub Statistics
4 Stars
10 Commits
3 Watching
1 Branches
1 Contributors
Bundle Size
54.91 kB
Minified
16.99 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.4
Package Id
truncate-logs@1.0.4
Size
1.76 kB
NPM Version
3.10.8
Node Version
6.9.1
Total Downloads
Cumulative downloads
Total Downloads
3,816
Last day
0%
1
Compared to previous day
Last week
-55.6%
4
Compared to previous week
Last month
31.3%
21
Compared to previous month
Last year
-51.9%
286
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Dev Dependencies
1
truncate-logs
CLI/JS module for truncating the beginning of a set of files easily. specify how many lines at the end of the file to keep, all files at the beginning will be truncated. implementation copies last N lines to a tmp file then replaces the original file, so it effectively in-place truncates the files.
usage
cli
npm i truncate-logs run-every -g
run-every 86400 truncate-logs --lines=5000 *.log
# default --lines value is 100000
js
1var truncate = require('truncate-logs') 2var opts = {lines: 500} // keep last 500 lines, default is 100000 3 4// you can specify an array of filenames 5truncate(['foo.txt', 'bar.txt'], opts, function (err) { 6 7}) 8 9// or you can pass a string and it will be globbed 10truncate('*.log', opts, function (err) { 11 12})
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/10 approved changesets -- score normalized to 0
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
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.6
/10
Last Scanned on 2025-01-27
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