Gathering detailed insights and metrics for fs-write-stream-atomic
Gathering detailed insights and metrics for fs-write-stream-atomic
Gathering detailed insights and metrics for fs-write-stream-atomic
Gathering detailed insights and metrics for fs-write-stream-atomic
@parcel/fs-write-stream-atomic
Like `fs.createWriteStream(...)`, but atomic.
@digidem/fs-write-stream-atomic
Like `fs.createWriteStream(...)`, but atomic.
atomic-lt
`cat` but using fs-write-stream-atomic
locked-atomic-ws
A combination of fs-write-stream-atomic and node-proper-lockfile to ensure that no more than one (atomic) write stream can be used at a time for a certain file.
npm install fs-write-stream-atomic
Typescript
Module System
Node Version
NPM Version
98.7
Supply Chain
77.6
Quality
80.6
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
49 Stars
44 Commits
16 Forks
23 Watchers
4 Branches
111 Contributors
Updated on May 27, 2024
Latest Version
1.0.10
Package Id
fs-write-stream-atomic@1.0.10
Size
5.49 kB
NPM Version
4.4.1
Node Version
7.7.1
Published on
Mar 07, 2017
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
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'
No 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
61 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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