Skip to content

Commit 175a5ec

Browse files
Trottcodebytere
authored andcommitted
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: #31326 Refs: #31073 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 5f45eaf commit 175a5ec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/api/url.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const myURL = new URL({ toString: () => 'https://example.org/' });
114114
// https://example.org/
115115
```
116116

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

120120
```js
@@ -192,7 +192,7 @@ Invalid host values assigned to the `host` property are ignored.
192192

193193
* {string}
194194

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

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

209-
Invalid hostname values assigned to the `hostname` property are ignored.
209+
Invalid host name values assigned to the `hostname` property are ignored.
210210

211211
#### `url.href`
212212

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

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

13051305
```js

0 commit comments

Comments
 (0)