summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-10-06 17:01:25 -0700
committerRich Trott <rtrott@gmail.com>2018-10-08 20:25:30 -0700
commitafb4914bf2b656722fada1cef259155440a22180 (patch)
treee142e781203519929549148eead8e4e7875091de /doc
parent8bce9e8f190ad2e10eb31bdceeaab4158d5ee8b4 (diff)
downloadandroid-node-v8-afb4914bf2b656722fada1cef259155440a22180.tar.gz
android-node-v8-afb4914bf2b656722fada1cef259155440a22180.tar.bz2
android-node-v8-afb4914bf2b656722fada1cef259155440a22180.zip
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: https://github.com/nodejs/node/pull/23306 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/stream.md18
1 files changed, 8 insertions, 10 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 4ec151a37c..a77d8f2191 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -1205,9 +1205,8 @@ added: v0.9.4
* `stream` {Stream} An "old style" readable stream
* Returns: {this}
-Versions of Node.js prior to v0.10 had streams that did not implement the
-entire `stream` module API as it is currently defined. (See [Compatibility][]
-for more information.)
+Prior to Node.js 0.10, streams did not implement the entire `stream` module API
+as it is currently defined. (See [Compatibility][] for more information.)
When using an older Node.js library that emits [`'data'`][] events and has a
[`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
<!--type=misc-->
-In versions of Node.js prior to v0.10, the `Readable` stream interface was
-simpler, but also less powerful and less useful.
+Prior to Node.js 0.10, the `Readable` stream interface was simpler, but also
+less powerful and less useful.
* Rather than waiting for calls the [`stream.read()`][stream-read] method,
[`'data'`][] events would begin emitting immediately. Applications that
@@ -2336,7 +2335,7 @@ simpler, but also less powerful and less useful.
guaranteed. This meant that it was still necessary to be prepared to receive
[`'data'`][] events *even when the stream was in a paused state*.
-In Node.js v0.10, the [`Readable`][] class was added. For backwards
+In Node.js 0.10, the [`Readable`][] class was added. For backwards
compatibility with older Node.js programs, `Readable` streams switch into
"flowing mode" when a [`'data'`][] event handler is added, or when the
[`stream.resume()`][stream-resume] method is called. The effect is that, even
@@ -2366,9 +2365,8 @@ net.createServer((socket) => {
}).listen(1337);
```
-In versions of Node.js prior to v0.10, the incoming message data would be
-simply discarded. However, in Node.js v0.10 and beyond, the socket remains
-paused forever.
+Prior to Node.js 0.10, the incoming message data would be simply discarded.
+However, in Node.js 0.10 and beyond, the socket remains paused forever.
The workaround in this situation is to call the
[`stream.resume()`][stream-resume] method to begin the flow of data:
@@ -2386,7 +2384,7 @@ net.createServer((socket) => {
```
In addition to new `Readable` streams switching into flowing mode,
-pre-v0.10 style streams can be wrapped in a `Readable` class using the
+pre-0.10 style streams can be wrapped in a `Readable` class using the
[`readable.wrap()`][`stream.wrap()`] method.
### `readable.read(0)`