Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
stream: utility consumers for web and node.js streams#39594
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Mesteery commented Jul 30, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Could a |
Uh oh!
There was an error while loading. Please reload this page.
ronag left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think error and type checking is done indirectly.
Uh oh!
There was an error while loading. Please reload this page.
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
344dba7 to d0efbc0Compare This comment has been minimized.
This comment has been minimized.
targos commented Aug 4, 2021
What happens if the functions are called on object streams? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot commented Aug 5, 2021 • edited by jasnell
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by jasnell
Uh oh!
There was an error while loading. Please reload this page.
jasnell commented Aug 6, 2021
For |
Signed-off-by: James M Snell <[email protected]>
d0efbc0 to ac912f5Comparejasnell commented Aug 6, 2021
Landed in c524107 |
Signed-off-by: James M Snell <[email protected]> PR-URL: #39594 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: #39594 Reviewed-By: Matteo Collina <[email protected]>
jimmywarting commented Aug 20, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I wished that I'm a bit biased towards Buffer in general cuz it isn't cross env friendly. and it's bloated with stuff TextEncoder and DataView is suppose to solve for you when working with typed arrays |
jimmywarting commented Aug 20, 2021
Would it be optimizable if arrayBuffer() had a totalLength option too? There would not be pkg like this otherwise that don't need to take up twice the size when it's time to concatinate: |
targos commented Oct 9, 2021
Like #39134, this needs a volunteer to backport to v16.x-staging. |
Mesteery commented Oct 9, 2021
I'm willing to take care of it. |
Signed-off-by: James M Snell <[email protected]> PR-URL: nodejs#39594 Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: James M Snell <[email protected]> PR-URL: nodejs#39594 Reviewed-By: Matteo Collina <[email protected]>
Mesteery commented Oct 9, 2021
Isn't it already good? |
targos commented Oct 9, 2021
@Mesteery you're right, sorry. It looks like the backport-requested label was added by mistake |
@mcollina@ronag ... here's an alternative approach to the Body mixin stuff. Rather than providing the Body mixin directly, these introduce utility functions that can be used by the ecosystem to provide those basic methods, at least in part.
For a very rudimentary example...
These work with
ReadableStream,stream.Readable, and async interables.There's likely a bit more error handling that could be added but I wanted to at least open the PR to give a basic idea.