Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improved readability #43694

Merged
merged 6 commits into from
Jul 6, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ The resolver instance will send its requests from the specified IP address.
This allows programs to specify outbound interfaces when used on multi-homed
systems.

If a v4 or v6 address is not specified, it is set to the default, and the
If a v4 or v6 address is not specified, it is set to the default and the
operating system will choose a local address automatically.

The resolver will use the v4 local address when making requests to IPv4 DNS
Expand Down Expand Up @@ -239,7 +239,7 @@ such as no available file descriptors.

`dns.lookup()` does not necessarily have anything to do with the DNS protocol.
The implementation uses an operating system facility that can associate names
with addresses, and vice versa. This implementation can have subtle but
with addresses and vice versa. This implementation can have subtle but
important consequences on the behavior of any Node.js program. Please take some
time to consult the [Implementation considerations section][] before using
`dns.lookup()`.
Expand Down Expand Up @@ -285,7 +285,7 @@ The following flags can be passed as hints to [`dns.lookup()`][].
returned if the current system has at least one IPv4 address configured.
* `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were
found, then return IPv4 mapped IPv6 addresses. It is not supported
on some operating systems (e.g FreeBSD 10.1).
on some operating systems (e.g. FreeBSD 10.1).
* `dns.ALL`: If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
well as IPv4 mapped IPv6 addresses.

Expand Down Expand Up @@ -387,7 +387,7 @@ changes:

* `hostname` {string} Host name to resolve.
* `options` {Object}
* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
* `ttl` {boolean} Retrieves the Time-To-Live value (TTL) of each record.
When `true`, the callback receives an array of
`{ address: '1.2.3.4', ttl: 60 }` objects rather than an array of strings,
with the TTL expressed in seconds.
Expand Down Expand Up @@ -426,7 +426,7 @@ changes:
* `err` {Error}
* `addresses` {string\[] | Object\[]}

Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the
`hostname`. The `addresses` argument passed to the `callback` function
will contain an array of IPv6 addresses.

Expand Down Expand Up @@ -575,7 +575,7 @@ changes:
* `err` {Error}
* `addresses` {Object\[]}

Uses the DNS protocol to resolve regular expression based records (`NAPTR`
Uses the DNS protocol to resolve regular expression-based records (`NAPTR`
records) for the `hostname`. The `addresses` argument passed to the `callback`
function will contain an array of objects with the following properties:

Expand Down Expand Up @@ -901,7 +901,7 @@ added:
-->

Cancel all outstanding DNS queries made by this resolver. The corresponding
promises will be rejected with an error with code `ECANCELLED`.
promises will be rejected with an error with the code `ECANCELLED`.

### `dnsPromises.getServers()`

Expand Down Expand Up @@ -965,7 +965,7 @@ such as no available file descriptors.

[`dnsPromises.lookup()`][] does not necessarily have anything to do with the DNS
protocol. The implementation uses an operating system facility that can
associate names with addresses, and vice versa. This implementation can have
associate names with addresses and vice versa. This implementation can have
subtle but important consequences on the behavior of any Node.js program. Please
take some time to consult the [Implementation considerations section][] before
using `dnsPromises.lookup()`.
Expand Down Expand Up @@ -1182,7 +1182,7 @@ added: v10.6.0

* `hostname` {string}

Uses the DNS protocol to resolve regular expression based records (`NAPTR`
Uses the DNS protocol to resolve regular expression-based records (`NAPTR`
records) for the `hostname`. On success, the `Promise` is resolved with an array
of objects with the following properties:

Expand Down Expand Up @@ -1380,11 +1380,11 @@ earlier ones time out or result in some other error.

Each DNS query can return one of the following error codes:

* `dns.NODATA`: DNS server returned answer with no data.
* `dns.NODATA`: DNS server returned an answer with no data.
* `dns.FORMERR`: DNS server claims query was misformatted.
* `dns.SERVFAIL`: DNS server returned general failure.
* `dns.NOTFOUND`: Domain name not found.
* `dns.NOTIMP`: DNS server does not implement requested operation.
* `dns.NOTIMP`: DNS server does not implement the requested operation.
* `dns.REFUSED`: DNS server refused query.
* `dns.BADQUERY`: Misformatted DNS query.
* `dns.BADNAME`: Misformatted host name.
Expand All @@ -1405,7 +1405,7 @@ Each DNS query can return one of the following error codes:
* `dns.ADDRGETNETWORKPARAMS`: Could not find `GetNetworkParams` function.
* `dns.CANCELLED`: DNS query cancelled.

The above error codes are also exported by the `dnsPromises` API, e.g., `dnsPromises.NODATA`.
The `dnsPromises` API also exports the above error codes, e.g., `dnsPromises.NODATA`.

## Implementation considerations

Expand Down Expand Up @@ -1441,7 +1441,7 @@ allow the default resolver, `dns.lookup()`, to be replaced.

These functions are implemented quite differently than [`dns.lookup()`][]. They
do not use getaddrinfo(3) and they _always_ perform a DNS query on the
network. This network communication is always done asynchronously, and does not
network. This network communication is always done asynchronously and does not
use libuv's threadpool.

As a result, these functions cannot have the same negative impact on other
Expand Down