file-replace-stream

1.0.0 • Public • Published

file-replace-stream

Build Status npm install npm version js-standard-style License

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 to filename.
  • 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

Package Sidebar

Install

npm i file-replace-stream

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jarofghosts