Gathering detailed insights and metrics for writsy
Gathering detailed insights and metrics for writsy
Gathering detailed insights and metrics for writsy
Gathering detailed insights and metrics for writsy
Write stream wrapper that supports async initialization and flush function
npm install writsy
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
39 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Dec 17, 2021
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
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
2
5
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())
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
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/30 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
branch protection not enabled on development/release branches
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