-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async iterator support? #74
Comments
Erm, at least at the time when this library was created, It’s probably fine to changes this at this point – I assume that that’s a breaking change, though. Is there any point in doing dependency injection, i.e. letting users choose between built-in vs readable-stream? |
Sounds like you were probably right not to use the built-in stuff: https://www.npmjs.com/package/readable-stream
I haven't read that blog post yet, but they make the in-built streams sound scary, so maybe just wait for |
as a workaround, I used import { PassThrough } from 'stream'
const pass = new PassThrough()
const readStream = fs.createReadStream(fpath).pipe(pass)
for await (const buffer of readStream) {
} as a workaround for this issue. This appears to work, until |
Would be cool if this lib were compatible with the new async iteration stuff! So we can, for example, do this:
Is there any reason why this lib is not using node's built-in streams? Because that would prevent the need for future updates of this sort.
The text was updated successfully, but these errors were encountered: