Installations
npm install writsy
Developer Guide
Typescript
No
Module System
N/A
Node Version
5.0.0
NPM Version
3.3.9
Score
70.2
Supply Chain
87.4
Quality
74.3
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
cshum
Download Statistics
Total Downloads
2,785
Last Day
1
Last Week
7
Last Month
25
Last Year
124
GitHub Statistics
3 Stars
39 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Bundle Size
31.21 kB
Minified
9.00 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.8
Package Id
writsy@1.0.8
Size
13.45 kB
NPM Version
3.3.9
Node Version
5.0.0
Total Downloads
Cumulative downloads
Total Downloads
2,785
Last day
0%
1
Compared to previous day
Last week
-22.2%
7
Compared to previous week
Last month
733.3%
25
Compared to previous month
Last year
-34%
124
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
5
writsy
Write stream wrapper that supports async initialization and flush function.
npm install writsy
var ws = writsy([opts])
var ws = writsy.obj([opts])
Wraps a new writable stream (or object stream) by passing init
callback function.
Supports optional flush
function that is called before 'finish' emitted.
1var writsy = require('writsy') 2... 3 4var ws = writsy({ 5 init (cb) { 6 // async initialization, error handling 7 mkdirp('/tmp/foo/', (err) => { 8 if (err) return cb(err) 9 cb(null, fs.createWriteStream('/tmp/foo/bar.txt')) 10 }) 11 }, 12 flush (cb) { 13 // flush before finish 14 fs.rename('/tmp/foo/bar.txt', './dest.txt', cb) 15 } 16}) 17 18fs.createReadStream('loremipsum.txt').pipe(ws)
Or class inheritance by setting _init
and _flush
methods:
1var Writsy = require('writsy') 2 3class Writer extends Writsy { 4 constructor (opts) { 5 super(opts) 6 } 7 _init (cb) { 8 // async initialization, error handling 9 mkdirp('/tmp/foo/', (err) => { 10 if (err) return cb(err) 11 cb(null, fs.createWriteStream('/tmp/foo/bar.txt')) 12 }) 13 } 14 _flush (cb) { 15 // flush before finish 16 fs.rename('/tmp/foo/bar.txt', './dest.txt', cb) 17 } 18} 19 20fs.createReadStream('loremipsum.txt').pipe(new Writer())
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
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
Found 0/30 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 SAST tool detected
Details
- Warn: no pull requests merged into dev branch
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
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/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