Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2020-03-24 09:04:38 +0300
committerRich Trott <rtrott@gmail.com>2020-03-26 09:15:20 +0300
commitf0a33d99ec4656b87bebb97162837047b52eb6f8 (patch)
tree271b9c12abe55fef339f50b431e12b936d7f1f78 /doc/api
parentdade90db9c64040f3bfc0ebb6d7556277e7de5a1 (diff)
doc: simplify and correct example descriptions in net.md
Instead of indicating that examples show lines to change in previous examples, present the examples as standalone items. They suffice on their own. In the first of these, it says to change "the second line" of a previous example, but if it were literally changed to the provided line, it would result in a syntax error. In the second of these, it gives the wrong line to change. All of this is unnecessary and probably makes the examples harder to follow. So simplify and treat each one as a separate example. PR-URL: https://github.com/nodejs/node/pull/32451 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/net.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/api/net.md b/doc/api/net.md
index ea0b9139fd3..a7b6eff6008 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -1064,8 +1064,7 @@ client.on('end', () => {
});
```
-To connect on the socket `/tmp/echo.sock` the second line would just be
-changed to:
+To connect on the socket `/tmp/echo.sock`:
```js
const client = net.createConnection({ path: '/tmp/echo.sock' });
@@ -1174,8 +1173,7 @@ Test this by using `telnet`:
$ telnet localhost 8124
```
-To listen on the socket `/tmp/echo.sock` the third line from the last would
-just be changed to:
+To listen on the socket `/tmp/echo.sock`:
```js
server.listen('/tmp/echo.sock', () => {