
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
fs-readstream-progress
Advanced tools
Track the progress of readStreams for Node fs or hyperdrive archives.
npm install fs-readstream-progress
Use it like fs.createReadStream, except that:
progress eventsfs.drain() methodAPI:
var getwithprogress = require('fs-readstream-progress')
var stream = getwithprogress(filename, opts)
Example:
var progress = require('fs-readstream-progress')
progress('somefile')
.on('progress', function (data) { console.log('progress:', data) })
.on('data', function(data) {})
.on('end', function() { console.log('done') })
Each progress event looks like:
{
done: 16, // integer, number of bytes streamed so far
total: 256, // integer, total number of bytes
progress: 0.0625 // float, proportion of the data streamed
}
When all the data have been streamed, the stream will emit end, just like fs.createReadStream.
fsTo use a different fs implementation (e.g. a hyperdrive archive), just pass
var hyperdrive = require('hyperdrive')
var getwithprogress = require('fs-readstream-progress')
var archive = hyperdrive('.')
var stream = getwithprogress('somefile', { fs: archive })
.drain()Drains the stream, pulling all data through without keeping it in memory.
This is useful if you just want to track a download from a hyperdrive archive.
To the extent possible by law, we transfer any rights we have in this code to the public domain. Specifically, we do so using the CC0 1.0 Universal Public Domain Dedication.
You can do whatever you want with this code. No need to credit us, link to us, include any license, or anything else. But if you want to do those things, you're free to do that too.
FAQs
fs-readstream-progress
We found that fs-readstream-progress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.