1.0.0 • Published 9 years ago
file-replace-stream v1.0.0
file-replace-stream
example
var fileReplaceStream = require('file-replace-stream')
// ... a short time later
aStreamOfSomethingImportant.pipe(fileReplaceStream('tracking-file.txt'))
Every time that aStreamOfSomethingImportant
emits, the contents of
tracking-file.txt
will be updated with the latest emission.
api
fileReplaceStream(filename) -> transformStream
- Writing to
transformStream
queues a write tofilename
. - Data writes will be dropped if they are superseded by others. In practice this should have no consequence.
- Writes are guaranteed to occur in order, so the latest data will always be
what is written to
filename
.
license
MIT
1.0.0
9 years ago