Description
The Node.js documentation is currently rather freeform when it comes to distinguishing between hostname
and host
. There are arguments and properties named host
that refer to hostname
and their description makes as much clear. There are also arguments and properties that refer to host
in both the name and the description, despite actually intending to represent the hostname
.
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