Skip to content

Commit f9bb026

Browse files
Trottjasnell
authored andcommitted
doc: standardize versions in stream module doc
Refer to Node.js versions without a prepended `v`. This was standardized on previously to avoid confusion between Node.js 8 and the V8 JavaScript engine. (`Node.js 8` is clear. `v8` or even `Node.js v8`, not so much.) PR-URL: #23306 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7084ed9 commit f9bb026

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

doc/api/stream.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,9 +1205,8 @@ added: v0.9.4
12051205
* `stream` {Stream} An "old style" readable stream
12061206
* Returns: {this}
12071207

1208-
Versions of Node.js prior to v0.10 had streams that did not implement the
1209-
entire `stream` module API as it is currently defined. (See [Compatibility][]
1210-
for more information.)
1208+
Prior to Node.js 0.10, streams did not implement the entire `stream` module API
1209+
as it is currently defined. (See [Compatibility][] for more information.)
12111210

12121211
When using an older Node.js library that emits [`'data'`][] events and has a
12131212
[`stream.pause()`][stream-pause] method that is advisory only, the
@@ -2325,8 +2324,8 @@ primarily for examples and testing, but there are some use cases where
23252324

23262325
<!--type=misc-->
23272326

2328-
In versions of Node.js prior to v0.10, the `Readable` stream interface was
2329-
simpler, but also less powerful and less useful.
2327+
Prior to Node.js 0.10, the `Readable` stream interface was simpler, but also
2328+
less powerful and less useful.
23302329

23312330
* Rather than waiting for calls the [`stream.read()`][stream-read] method,
23322331
[`'data'`][] events would begin emitting immediately. Applications that
@@ -2336,7 +2335,7 @@ simpler, but also less powerful and less useful.
23362335
guaranteed. This meant that it was still necessary to be prepared to receive
23372336
[`'data'`][] events *even when the stream was in a paused state*.
23382337

2339-
In Node.js v0.10, the [`Readable`][] class was added. For backwards
2338+
In Node.js 0.10, the [`Readable`][] class was added. For backwards
23402339
compatibility with older Node.js programs, `Readable` streams switch into
23412340
"flowing mode" when a [`'data'`][] event handler is added, or when the
23422341
[`stream.resume()`][stream-resume] method is called. The effect is that, even
@@ -2366,9 +2365,8 @@ net.createServer((socket) => {
23662365
}).listen(1337);
23672366
```
23682367

2369-
In versions of Node.js prior to v0.10, the incoming message data would be
2370-
simply discarded. However, in Node.js v0.10 and beyond, the socket remains
2371-
paused forever.
2368+
Prior to Node.js 0.10, the incoming message data would be simply discarded.
2369+
However, in Node.js 0.10 and beyond, the socket remains paused forever.
23722370

23732371
The workaround in this situation is to call the
23742372
[`stream.resume()`][stream-resume] method to begin the flow of data:
@@ -2386,7 +2384,7 @@ net.createServer((socket) => {
23862384
```
23872385

23882386
In addition to new `Readable` streams switching into flowing mode,
2389-
pre-v0.10 style streams can be wrapped in a `Readable` class using the
2387+
pre-0.10 style streams can be wrapped in a `Readable` class using the
23902388
[`readable.wrap()`][`stream.wrap()`] method.
23912389

23922390
### `readable.read(0)`

0 commit comments

Comments
 (0)