TextDecoder and Web streams #340
bjohansebas
started this conversation in
Ideas
Replies: 1 comment
-
|
Node.js provides the https://nodejs.org/api/stream.html#streamreadablefromwebreadablestream-options https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Something I've been thinking about since I researched this package is that we could use web streams and TextDecoder for stream support in the browser. There's work done by Alexander (https://github.com/pillarjs/iconv-lite/tree/next) that uses the idea of backers to somewhat separate the logic between environments, which I think would be a great starting point. I haven’t explored this in depth yet.
We also need to remember that this package is used by body-parser, raw-body, and qs, among many others, so we can’t stop using Node.js streams, since those packages rely on Node.js streams. Some kind of logic would be needed to convert Node.js streams to web streams.
Beta Was this translation helpful? Give feedback.
All reactions