Skip to content

Commit 1c12567

Browse files
Fishrock123rvagg
authored andcommitted
doc: addresses nits in string_decoder, url, util
- Only `@@toStringTag` affects `util.isError()`, this is the reason why it uses `Object.prototype.toString.call(argument)` under the hood. - Shows an actual Euro symbol for reference. - Uses line-drawing characters for the URL chart & fixes the chart borders. PR-URL: #7026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 6a62bb0 commit 1c12567

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

โ€Ždoc/api/string_decoder.mdโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal buffer is used to ensure that the decoded string does not contain
2828
any incomplete multibyte characters. These are held in the buffer until the
2929
next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
3030

31-
In the following example, the three UTF-8 encoded bytes of the European euro
32-
symbol are written over three separate operations:
31+
In the following example, the three UTF-8 encoded bytes of the European Euro
32+
symbol (`โ‚ฌ`) are written over three separate operations:
3333

3434
```js
3535
const StringDecoder = require('string_decoder').StringDecoder;

โ€Ždoc/api/url.mdโ€Ž

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ The following details each of the components of a parsed URL. The example
2020
illustrate each.
2121

2222
```
23-
+---------------------------------------------------------------------------+
24-
| href |
25-
+----------++-----------+-----------------+-------------------------+-------+
26-
| protocol || auth | host | path | hash |
27-
| || +----------+------+----------+--------------+ |
28-
| || | hostname | port | pathname | search | |
29-
| || | | | +-+------------+ |
30-
| || | | | | | query | |
31-
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
32-
| || | | | | | | |
33-
+----------++-----------+-----------+------+----------+-+-----------+-------+
23+
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
24+
โ”‚ href โ”‚
25+
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
26+
โ”‚ protocol โ”‚โ”‚ auth โ”‚ host โ”‚ path โ”‚ hash โ”‚
27+
โ”‚ โ”‚โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚
28+
โ”‚ โ”‚โ”‚ โ”‚ hostname โ”‚ port โ”‚ pathname โ”‚ search โ”‚ โ”‚
29+
โ”‚ โ”‚โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚
30+
โ”‚ โ”‚โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ query โ”‚ โ”‚
31+
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
32+
โ”‚ โ”‚โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
33+
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
3434
(all spaces in the "" line should be ignored -- they're purely for formatting)
3535
```
3636

โ€Ždoc/api/util.mdโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ util.isError({ name: 'Error', message: 'an error occurred' });
389389

390390
Note that this method relies on `Object.prototype.toString()` behavior. It is
391391
possible to obtain an incorrect result when the `object` argument manipulates
392-
the `@@toStringTag` or overrides the `toString()` method.
392+
`@@toStringTag`.
393393

394394
```js
395395
const util = require('util');

0 commit comments

Comments
ย (0)
โšก