| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
nit, Not sure of the purpose here, but wouldn't objectMode: false make more sense here as a default? Or is that breaking?
Sorry, something went wrong.
There was a problem hiding this comment.
I would keep it consistent with the rest. Also, it would change the encoding, so possibly it's not a good idea.
Sorry, something went wrong.
|
This does change behaviour when a buffer is passed, is that intentional? |
Sorry, something went wrong.
Yes, instead of emitting one byte at a time, we will push through the full chunk. This will remove a lot of overhead when using this API. |
Sorry, something went wrong.
|
@mcollina yes, but instead of emitting numbers, it now emits a Buffer |
Sorry, something went wrong.
|
Ouch. I would consider this a bug :/. |
Sorry, something went wrong.
There was a problem hiding this comment.
Should we check for Stream._isUint8Array as well?
Sorry, something went wrong.
There was a problem hiding this comment.
That would only be okay if we turn off object mode, I think
Sorry, something went wrong.
I would agree, but could you document that Buffers are treated differently from other iterables in that case? |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #30912 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #30912 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #30912 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #30912 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
| Back | FazBrowse Home | New Git URL |
This PR makes Readable.from() to not iterate over strings and buffers to avoid unnecessary overhead.
Checklist