| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| for await (const chunk of transformedStream) | ||
| console.log(chunk); | ||
| // Prints A |
There was a problem hiding this comment.
| // Prints A | |
| // Prints: A |
Sorry, something went wrong.
| (async () => { | ||
| for await (const chunk of transformedStream) | ||
| console.log(chunk); | ||
| // Prints A |
There was a problem hiding this comment.
| // Prints A | |
| // Prints: A |
Sorry, something went wrong.
| const readable = Readable.from(dataArray); | ||
| const data = await arrayBuffer(readable); | ||
| console.log(`from readable: ${data.byteLength}`); | ||
| // Prints from readable: 76 |
There was a problem hiding this comment.
| // Prints from readable: 76 | |
| // Prints: from readable: 76 |
Sorry, something went wrong.
| const readable = Readable.from(dataArray); | ||
| arrayBuffer(readable).then((data) => { | ||
| console.log(`from readable: ${data.byteLength}`); | ||
| // Prints from readable: 76 |
There was a problem hiding this comment.
| // Prints from readable: 76 | |
| // Prints: from readable: 76 |
Sorry, something went wrong.
| const readable = dataBlob.stream(); | ||
| const data = await blob(readable); | ||
| console.log(`from readable: ${data.size}`); | ||
| // Prints from readable: 27 |
There was a problem hiding this comment.
| // Prints from readable: 27 | |
| // Prints: from readable: 27 |
Sorry, something went wrong.
| const readable = Readable.from(dataBuffer); | ||
| buffer(readable).then((data) => { | ||
| console.log(`from readable: ${data.length}`); | ||
| // Prints from readable: 27 |
There was a problem hiding this comment.
| // Prints from readable: 27 | |
| // Prints: from readable: 27 |
Sorry, something went wrong.
| const readable = Readable.from(JSON.stringify(items)); | ||
| const data = await json(readable); | ||
| console.log(`from readable: ${data.length}`); | ||
| // Prints from readable: 100 |
There was a problem hiding this comment.
| // Prints from readable: 100 | |
| // Prints: from readable: 100 |
Sorry, something went wrong.
| const readable = Readable.from(JSON.stringify(items)); | ||
| json(readable).then((data) => { | ||
| console.log(`from readable: ${data.length}`); | ||
| // Prints from readable: 100 |
There was a problem hiding this comment.
| // Prints from readable: 100 | |
| // Prints: from readable: 100 |
Sorry, something went wrong.
| const readable = Readable.from('Hello world from consumers!'); | ||
| const data = await text(readable); | ||
| console.log(`from readable: ${data.length}`); | ||
| // Prints from readable: 27 |
There was a problem hiding this comment.
| // Prints from readable: 27 | |
| // Prints: from readable: 27 |
Sorry, something went wrong.
| const readable = Readable.from('Hello world from consumers!'); | ||
| text(readable).then((data) => { | ||
| console.log(`from readable: ${data.length}`); | ||
| // Prints from readable: 27 |
There was a problem hiding this comment.
| // Prints from readable: 27 | |
| // Prints: from readable: 27 |
Sorry, something went wrong.
$ git grep "// Prints:" doc/ | wc -l
505
$ git grep "// Prints " doc/ | wc -l
115
|
Sorry, something went wrong.
|
@lpinca Hi, thank you for your opinion. |
Sorry, something went wrong.
PR-URL: #49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#49326 Refs: nodejs/node#49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#49326 Refs: nodejs/node#49143 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
| Back | FazBrowse Home | New Git URL |
As with the other examples, I added something about the resulting output.(Only output results that do not change)