-
Notifications
You must be signed in to change notification settings - Fork 2
Overhaul and update project #11
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
Conversation
Switching to using babel transform runtime solves issue #5.
ece3fd7
to
faff23f
Compare
Not sure if you are aware, but in Node 12+ the Readable stream implements asyncIterator already: #!/usr/bin/env node
"use strict";
const { Readable } = require("stream");
(async function () {
const readStream = Readable.from([1, 2, 3]);
for await (const chunk of readStream) {
console.dir({ chunk });
}
})(); |
@LinusU It was more an attempt to get this to wrap around a db driver module that used an instance of |
.throw
and.return
interface methods to StreamToAsyncIterator #1. Now handles.throw
and.return
hooks on the async iterator.