Skip to content

Commit ad4f0f2

Browse files
committed
typos
1 parent 10600d0 commit ad4f0f2

File tree

1 file changed

+2
-2
lines changed
  • src/blog/articles/nodejs-stream-consumers-utilities

1 file changed

+2
-2
lines changed

src/blog/articles/nodejs-stream-consumers-utilities/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If we execute this code, we will see the following output:
100100
You can see that all the binary data (~300Kb) was loaded in the buffer, but also that this feature (as of v17.7.1) is still experimental and therefore we get a warning. You will get a similar warning also when trying to use `consumers.arrayBuffer` and `consumers.blob`. This will be the case until `buffer.Blob` is stabilised.
101101
102102
103-
## Reading a JSON file from a Readable stream
103+
## Reading a JSON object from a Readable stream
104104
105105
Similarly to what we just saw in the previous section, we can use the `stream/consumers` library to consume the entire content of a `ReadableStream` as a JSON encoded string. For instance, we could use this to process the response body from an HTTP request:
106106
@@ -144,7 +144,7 @@ Here we are using the awesome (and free) [The Rick and Morty API](https://rickan
144144
It's also worth mentioning that `consumers.json` does not produce any warning, so this feature can be considered stable in Node.js 16.
145145
146146
147-
## Reading a text file from a Readable stream
147+
## Reading a text from a Readable stream
148148
149149
Let's discuss one more example. Let's try to consume an entire readable stream as text, which means that we will be consuming the stream assuming it's a valid UTF-8 encoded string and save the result into a string variable.
150150

0 commit comments

Comments
 (0)