Skip to content

Commit e5777b3

Browse files
bcmarinacciMyles Borins
authored and
Myles Borins
committed
doc: edit Stream api grammar
Sections: - Introduction - Orginization of this Document - Object Mode - Buffering - API for Stream Implementers PR-URL: #9100 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 2c5b27a commit e5777b3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/api/stream.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ The `stream` module can be accessed using:
1919
const stream = require('stream');
2020
```
2121

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,
2323
the `stream` module itself is most useful for developers that are creating new
2424
types of stream instances. Developer's who are primarily *consuming* stream
2525
objects will rarely (if ever) have need to use the `stream` module directly.
2626

27-
## Organization of this document
27+
## Organization of this Document
2828

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
3030
additional notes. The first section explains the elements of the stream API that
3131
are required to *use* streams within an application. The second section explains
3232
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:
4848

4949
All streams created by Node.js APIs operate exclusively on strings and `Buffer`
5050
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
5252
purpose within streams). Such streams are considered to operate in "object
5353
mode".
5454

@@ -87,7 +87,7 @@ total size of the internal write buffer is below the threshold set by
8787
the size of the internal buffer reaches or exceeds the `highWaterMark`, `false`
8888
will be returned.
8989

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,
9191
is to limit the buffering of data to acceptable levels such that sources and
9292
destinations of differing speeds will not overwhelm the available memory.
9393

@@ -98,8 +98,8 @@ appropriate and efficient flow of data. For example, [`net.Socket`][] instances
9898
are [Duplex][] streams whose Readable side allows consumption of data received
9999
*from* the socket and whose Writable side allows writing data *to* the socket.
100100
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.
103103

104104
## API for Stream Consumers
105105

@@ -1061,7 +1061,7 @@ Examples of Transform streams include:
10611061
<!--type=misc-->
10621062

10631063
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.
10651065

10661066
First, a stream developer would declare a new JavaScript class that extends one
10671067
of the four basic stream classes (`stream.Writable`, `stream.Readable`,

0 commit comments

Comments
 (0)