Gathering detailed insights and metrics for @digidem/fs-write-stream-atomic
Gathering detailed insights and metrics for @digidem/fs-write-stream-atomic
npm install @digidem/fs-write-stream-atomic
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
22,747
Last Day
2
Last Week
3
Last Month
7
Last Year
404
49 Stars
44 Commits
16 Forks
25 Watching
4 Branches
116 Contributors
Latest Version
1.1.0
Package Id
@digidem/fs-write-stream-atomic@1.1.0
Unpacked Size
18.60 kB
Size
5.52 kB
File Count
11
NPM Version
6.1.0
Node Version
8.11.1
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
0%
3
Compared to previous week
Last month
-70.8%
7
Compared to previous month
Last year
-70.9%
404
Compared to previous year
4
Like fs.createWriteStream(...)
, but atomic.
Writes to a tmp file and does an atomic fs.rename
to move it into
place when it's done.
First rule of debugging: It's always a race condition.
1var fsWriteStreamAtomic = require('fs-write-stream-atomic') 2// options are optional. 3var write = fsWriteStreamAtomic('output.txt', options) 4var read = fs.createReadStream('input.txt') 5read.pipe(write) 6 7// When the write stream emits a 'finish' or 'close' event, 8// you can be sure that it is moved into place, and contains 9// all the bytes that were written to it, even if something else 10// was writing to `output.txt` at the same time.
fsWriteStreamAtomic(filename, [options])
filename
{String} The file we want to write tooptions
{Object}
chown
{Object} User and group to set ownership after write
uid
{Number}gid
{Number}encoding
{String} default = 'utf8'mode
{Number} default = 0666
flags
{String} default = 'w'
getTmpname
{Function} Custom function for generating a tmp name for the file as it is being copied. Passed the filename as the argument, should return a string valid filename. Default blob/custom-tmp-name/index.js#L16-L19No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 1/24 approved changesets -- score normalized to 0
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
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
60 existing vulnerabilities detected
Details
Score
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