1.0.0 • Published 9 years ago

file-replace-stream v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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