-
Notifications
You must be signed in to change notification settings - Fork 171
support whatwg-stream.ReadableStream as decodeAsync() input source #43
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
lol this is exactly that I needed to add next 😄
Codecov Report
@@ Coverage Diff @@ ## master #43 +/- ## ========================================== - Coverage 91.46% 90.19% -1.27% ========================================== Files 14 15 +1 Lines 808 826 +18 Branches 170 173 +3 ========================================== + Hits 739 745 +6 - Misses 49 59 +10 - Partials 20 22 +2
Continue to review full report at Codecov.
|
lol
@sergeyzenchenko Add ReadableStream
to the input source type of decodeAsync and decodeArrayStream. What do you think of these interfaces?
Looks good to me, but I think we need to make a function for it because same piece of code will be used in decodeStream too, so in 3 places in total.
Right. Extracted ensureAsyncIterable()
df769d0
Looks good for merge
Thanks 😉
BTW I've invited you to a collaborator of this repo to work for this repo easily. Please check your inbox.
And, please make a pull request for changes anyway, except for doc fixes. I'll do so, too.
Thanks! Sure everything will be using PRs
@gfx what the process of merging? Should you merge mine PR and I yours or it can be done by ourself?
I think it's better to review each other for the code, as much as possible, but feel free to fix/improve docs, examples, benchmark scripts, and tests.
I meant who will press merge button after review?) Also are we using only merge or squash and merge too?
Basically, the author of the PR should push the merge button after reviewed, but because we live in different timezones, there can be exeptions.
No squash nor rebase is needed.
whatwg-streams are standard stream api in browsers, for example as the response body of whatwg fetch api. Unfortunately, whatwg-streams do not support
AsyncIterable
, so if you want to give them todecodeAsync()
you have to convert them toAsyncIterable
, which is not a trivial thing.This PR is working in progress, waiting for #42 is merged.