#How can I create a linked [ReadableStream,WritableStream] pair?
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
Hi, I have a function A which accepts a WritableStream and another function B which accepts a ReadableStream. How can I plug them into each other so that the writes from function A will be given to function B?
In NodeJS this could be accomplished with an NPM package like https://github.com/indutny/stream-pair.
const identityTransform = new TransformStream();
a(identityTransform.writable);
b(identityTransform.readable);
hah, that's brilliant