Skip to content

Commit

Permalink
doc: addresses nits in string_decoder, url, util
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
Fishrock123 committed May 31, 2016
1 parent 67368d8 commit 0cc9035
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions doc/api/string_decoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ internal buffer is used to ensure that the decoded string does not contain
any incomplete multibyte characters. These are held in the buffer until the
next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.

In the following example, the three UTF-8 encoded bytes of the European euro
symbol are written over three separate operations:
In the following example, the three UTF-8 encoded bytes of the European Euro
symbol (`€`) are written over three separate operations:

```js
const StringDecoder = require('string_decoder').StringDecoder;
Expand Down
22 changes: 11 additions & 11 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ The following details each of the components of a parsed URL. The example
illustrate each.

```
+---------------------------------------------------------------------------+
| href |
+----------++-----------+-----------------+-------------------------+-------+
| protocol || auth | host | path | hash |
| || +----------+------+----------+--------------+ |
| || | hostname | port | pathname | search | |
| || | | | +-+------------+ |
| || | | | | | query | |
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
| || | | | | | | |
+----------++-----------+-----------+------+----------+-+-----------+-------+
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ href β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ protocol β”‚β”‚ auth β”‚ host β”‚ path β”‚ hash β”‚
β”‚ β”‚β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚β”‚ β”‚ hostname β”‚ port β”‚ pathname β”‚ search β”‚ β”‚
β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ query β”‚ β”‚
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜
(all spaces in the "" line should be ignored -- they're purely for formatting)
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ util.isError({ name: 'Error', message: 'an error occurred' });

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

```js
const util = require('util');
Expand Down

0 comments on commit 0cc9035

Please sign in to comment.