| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2c5b27a commit e5777b3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,14 +19,14 @@ The `stream` module can be accessed using: | |||
| 19 | 19 | const stream = require('stream'); | |
| 20 | 20 | ``` | |
| 21 | 21 | ||
| 22 | - While it is important for all Node.js users to understand how streams works, | ||
| 22 | + While it is important for all Node.js users to understand how streams work, | ||
| 23 | 23 | the `stream` module itself is most useful for developers that are creating new | |
| 24 | 24 | types of stream instances. Developer's who are primarily *consuming* stream | |
| 25 | 25 | objects will rarely (if ever) have need to use the `stream` module directly. | |
| 26 | 26 | ||
| 27 | - ## Organization of this document | ||
| 27 | + ## Organization of this Document | ||
| 28 | 28 | ||
| 29 | - This document is divided into two primary sections and third section for | ||
| 29 | + This document is divided into two primary sections with a third section for | ||
| 30 | 30 | additional notes. The first section explains the elements of the stream API that | |
| 31 | 31 | are required to *use* streams within an application. The second section explains | |
| 32 | 32 | the elements of the API that are required to *implement* new types of streams. | |
@@ -48,7 +48,7 @@ There are four fundamental stream types within Node.js: | |||
| 48 | 48 | ||
| 49 | 49 | All streams created by Node.js APIs operate exclusively on strings and `Buffer` | |
| 50 | 50 | objects. It is possible, however, for stream implementations to work with other | |
| 51 | - types of JavaScript values (with the exception of `null` which serves a special | ||
| 51 | + types of JavaScript values (with the exception of `null`, which serves a special | ||
| 52 | 52 | purpose within streams). Such streams are considered to operate in "object | |
| 53 | 53 | mode". | |
| 54 | 54 | ||
@@ -87,7 +87,7 @@ total size of the internal write buffer is below the threshold set by | |||
| 87 | 87 | the size of the internal buffer reaches or exceeds the `highWaterMark`, `false` | |
| 88 | 88 | will be returned. | |
| 89 | 89 | ||
| 90 | - A key goal of the `stream` API, and in particular the [`stream.pipe()`] method, | ||
| 90 | + A key goal of the `stream` API, particularly the [`stream.pipe()`] method, | ||
| 91 | 91 | is to limit the buffering of data to acceptable levels such that sources and | |
| 92 | 92 | destinations of differing speeds will not overwhelm the available memory. | |
| 93 | 93 | ||
@@ -98,8 +98,8 @@ appropriate and efficient flow of data. For example, [`net.Socket`][] instances | |||
| 98 | 98 | are [Duplex][] streams whose Readable side allows consumption of data received | |
| 99 | 99 | *from* the socket and whose Writable side allows writing data *to* the socket. | |
| 100 | 100 | Because data may be written to the socket at a faster or slower rate than data | |
| 101 | - is received, it is important each side operate (and buffer) independently of | ||
| 102 | - the other. | ||
| 101 | + is received, it is important for each side to operate (and buffer) independently | ||
| 102 | + of the other. | ||
| 103 | 103 | ||
| 104 | 104 | ## API for Stream Consumers | |
| 105 | 105 | ||
@@ -1061,7 +1061,7 @@ Examples of Transform streams include: | |||
| 1061 | 1061 | <!--type=misc--> | |
| 1062 | 1062 | ||
| 1063 | 1063 | The `stream` module API has been designed to make it possible to easily | |
| 1064 | - implement streams using JavaScript's prototypical inheritance model. | ||
| 1064 | + implement streams using JavaScript's prototypal inheritance model. | ||
| 1065 | 1065 | ||
| 1066 | 1066 | First, a stream developer would declare a new JavaScript class that extends one | |
| 1067 | 1067 | of the four basic stream classes (`stream.Writable`, `stream.Readable`, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments