diff options
author | Rich Trott <rtrott@gmail.com> | 2020-01-12 19:09:26 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-01-14 21:17:33 +0300 |
commit | 2bb85b85c94465246841c8f4bcd73a6bec0917a6 (patch) | |
tree | e0f6faf4f25d9b9984f6ebb42272dd3951d51f98 /doc/api/url.md | |
parent | 342a89f09d6e1d06c1583f9b66ae9fb326803bab (diff) |
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>
Diffstat (limited to 'doc/api/url.md')
-rw-r--r-- | doc/api/url.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/url.md b/doc/api/url.md index 0fb6939d449..a198b699cd3 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -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 |