Skip to content

Commit

Permalink
doc: standardize on "host name" in url.md
Browse files Browse the repository at this point in the history
Our docs have a mix of "hostname" and "host name" in prose.

Let's follow the usage of Unix man pages, RFCs, and most
professionally-edited sources, and use "host name" in prose and
"hostname" to refer to the command and in code.

Lint rule forthcoming.

PR-URL: #31326
Refs: #31073
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Mar 17, 2020
1 parent 5f45eaf commit 175a5ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const myURL = new URL({ toString: () => 'https://example.org/' });
// https://example.org/
```

Unicode characters appearing within the hostname of `input` will be
Unicode characters appearing within the host name of `input` will be
automatically converted to ASCII using the [Punycode][] algorithm.

```js
Expand Down Expand Up @@ -192,7 +192,7 @@ Invalid host values assigned to the `host` property are ignored.

* {string}

Gets and sets the hostname portion of the URL. The key difference between
Gets and sets the host name portion of the URL. The key difference between
`url.host` and `url.hostname` is that `url.hostname` does *not* include the
port.

Expand All @@ -206,7 +206,7 @@ console.log(myURL.href);
// Prints https://example.com:81/foo
```

Invalid hostname values assigned to the `hostname` property are ignored.
Invalid host name values assigned to the `hostname` property are ignored.

#### `url.href`

Expand Down Expand Up @@ -1298,8 +1298,8 @@ path of most URLs. The *fragment percent-encode set* is used for URL fragments.
The *C0 control percent-encode set* is used for host and path under certain
specific conditions, in addition to all other cases.

When non-ASCII characters appear within a hostname, the hostname is encoded
using the [Punycode][] algorithm. Note, however, that a hostname *may* contain
When non-ASCII characters appear within a host name, the host name is encoded
using the [Punycode][] algorithm. Note, however, that a host name *may* contain
*both* Punycode encoded and percent-encoded characters:

```js
Expand Down

0 comments on commit 175a5ec

Please sign in to comment.