Skip to content

Commit a0e8e7f

Browse files
Trotttargos
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 2b77b94 commit a0e8e7f

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

doc/api/stream.md

+8-10
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
@@ -2316,8 +2315,8 @@ primarily for examples and testing, but there are some use cases where
23162315

23172316
<!--type=misc-->
23182317

2319-
In versions of Node.js prior to v0.10, the `Readable` stream interface was
2320-
simpler, but also less powerful and less useful.
2318+
Prior to Node.js 0.10, the `Readable` stream interface was simpler, but also
2319+
less powerful and less useful.
23212320

23222321
* Rather than waiting for calls the [`stream.read()`][stream-read] method,
23232322
[`'data'`][] events would begin emitting immediately. Applications that
@@ -2327,7 +2326,7 @@ simpler, but also less powerful and less useful.
23272326
guaranteed. This meant that it was still necessary to be prepared to receive
23282327
[`'data'`][] events *even when the stream was in a paused state*.
23292328

2330-
In Node.js v0.10, the [`Readable`][] class was added. For backwards
2329+
In Node.js 0.10, the [`Readable`][] class was added. For backwards
23312330
compatibility with older Node.js programs, `Readable` streams switch into
23322331
"flowing mode" when a [`'data'`][] event handler is added, or when the
23332332
[`stream.resume()`][stream-resume] method is called. The effect is that, even
@@ -2357,9 +2356,8 @@ net.createServer((socket) => {
23572356
}).listen(1337);
23582357
```
23592358

2360-
In versions of Node.js prior to v0.10, the incoming message data would be
2361-
simply discarded. However, in Node.js v0.10 and beyond, the socket remains
2362-
paused forever.
2359+
Prior to Node.js 0.10, the incoming message data would be simply discarded.
2360+
However, in Node.js 0.10 and beyond, the socket remains paused forever.
23632361

23642362
The workaround in this situation is to call the
23652363
[`stream.resume()`][stream-resume] method to begin the flow of data:
@@ -2377,7 +2375,7 @@ net.createServer((socket) => {
23772375
```
23782376

23792377
In addition to new `Readable` streams switching into flowing mode,
2380-
pre-v0.10 style streams can be wrapped in a `Readable` class using the
2378+
pre-0.10 style streams can be wrapped in a `Readable` class using the
23812379
[`readable.wrap()`][`stream.wrap()`] method.
23822380

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

0 commit comments

Comments
 (0)