Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 47f71de

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
doc: standardize on "host name" in fs.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 <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>
1 parent ece70a8 commit 47f71de
Copy full SHA for 47f71de

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ fs.readFileSync(fileUrl);
175175

176176
Using WHATWG [`URL`][] objects might introduce platform-specific behaviors.
177177

178-
On Windows, `file:` URLs with a hostname convert to UNC paths, while `file:`
178+
On Windows, `file:` URLs with a host name convert to UNC paths, while `file:`
179179
URLs with drive letters convert to local absolute paths. `file:` URLs without a
180-
hostname nor a drive letter will result in a throw:
180+
host name nor a drive letter will result in a throw:
181181

182182
```js
183183
// On Windows :
@@ -199,7 +199,7 @@ fs.readFileSync(new URL('file:///c/p/a/t/h/file'));
199199
`file:` URLs with drive letters must use `:` as a separator just after
200200
the drive letter. Using another separator will result in a throw.
201201

202-
On all other platforms, `file:` URLs with a hostname are unsupported and will
202+
On all other platforms, `file:` URLs with a host name are unsupported and will
203203
result in a throw:
204204

205205
```js

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.