Proposal: writev equivalent WritableStreamDefaultWriter
#1309
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
Today, writing multiple values at once to a
WritableStream
is not generally possible or efficient. Each individual call towrite(...)
assumes a single value, with a single promise returned per value.What solutions exist today?
Node.js
stream.Writable
offers bothwrite(...)
andwritev(...)
options. Thewrite(...)
takes a single value whilewritev(...)
takes multiple.How would you solve it?
Introduce a new
writev(...)
method toWritableStreamDefaultWriter
(or something similar)So instead of something like...
We could simply (and efficiently do)
The
writev(...)
method would accept any iterable or async-iterable as the input.Anything else?
No response
The text was updated successfully, but these errors were encountered: