doc: standardize on "host name" in url.md

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: https://github.com/nodejs/node/pull/31326
Refs: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Rich Trott authored and Myles Borins committed 2020-01-16 01:43:45 -05:00
1 parent 28245277d7
commit aedbfdb33a
1 file changed
+5 -5
+5 -5
View File
@@ -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
@@ -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.
@@ -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`
@@ -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