- From: guest271314 <notifications@github.com>
- Date: Sun, 20 Aug 2017 13:33:39 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 20 August 2017 20:34:00 UTC
@domenic Browsing https://github.com/whatwg/streams/blob/1e13713cc8671fcd029f0a34b6b4af55962f73af/demos/transforms/parse-json.js revealed solution, that is to pass transformed value to `.enqueue()` method of `TransformStreamDefaultController` ``` const {readable, writable} = ts = new TransformStream({ transform(chunk, c) { console.log(chunk, c); c.enqueue(chunk.map(c => c * 10)); // {"value":[10,20,30],"done":false} } }); ``` which yields `{"value":[10,20,30],"done":false}` at `.then()` chained to `.read()` of returned `ReadableStream` of `.pipeThrough()`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/765#issuecomment-323610147
Received on Sunday, 20 August 2017 20:34:00 UTC