-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Inconsistent documentation: hostname vs host #20892
Copy link
Copy link
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
The Node.js documentation is currently rather freeform when it comes to distinguishing between
hostnameandhost. There are arguments and properties namedhostthat refer tohostnameand their description makes as much clear. There are also arguments and properties that refer tohostin both the name and the description, despite actually intending to represent thehostname.This can without any doubt create confusion for end users but also for contributors. For a recent example see: #20875 or #20493
I think it would be nice if we could slowly update the the documentation and code to be more clear about this. While we cannot change property names on options objects, argument names can certainly be changed and documentation can be updated.
Some example entries:
https://nodejs.org/dist/latest-v10.x/docs/api/tls.html#tls_tls_checkserveridentity_host_cert
https://nodejs.org/dist/latest-v10.x/docs/api/tls.html#tls_tls_connect_port_host_options_callback
https://nodejs.org/dist/latest-v10.x/docs/api/tls.html#tls_tls_connect_options_callback
https://nodejs.org/dist/latest-v10.x/docs/api/net.html#net_server_listen_options_callback