Skip to content

Commit b3a142d

Browse files
domdomeggbmeck
authored andcommitted
doc: fix dns.lookup family 0 and all descriptions
PR-URL: nodejs#51653 Fixes: nodejs#51482 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent a78f606 commit b3a142d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

doc/api/dns.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ changes:
210210
* `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For
211211
backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4`
212212
and `6` respectively. The value `0` indicates that either an IPv4 or IPv6
213-
address is returned. If the value `0` is used with `{ all: true } (see below)`,
214-
both IPv4 and IPv6 addresses are returned. **Default:** `0`.
213+
address is returned. If the value `0` is used with `{ all: true }` (see
214+
below), either one of or both IPv4 and IPv6 addresses are returned,
215+
depending on the system's DNS resolver. **Default:** `0`.
215216
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
216217
flags may be passed by bitwise `OR`ing their values.
217218
* `all` {boolean} When `true`, the callback returns all resolved addresses in
@@ -240,8 +241,8 @@ changes:
240241

241242
Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
242243
AAAA (IPv6) record. All `option` properties are optional. If `options` is an
243-
integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
244-
IPv4 and IPv6 addresses are both returned if found.
244+
integer, then it must be `4` or `6` – if `options` is not provided, then
245+
either IPv4 or IPv6 addresses, or both, are returned if found.
245246

246247
With the `all` option set to `true`, the arguments for `callback` change to
247248
`(err, addresses)`, with `addresses` being an array of objects with the
@@ -988,8 +989,9 @@ changes:
988989
* `options` {integer | Object}
989990
* `family` {integer} The record family. Must be `4`, `6`, or `0`. The value
990991
`0` indicates that either an IPv4 or IPv6 address is returned. If the
991-
value `0` is used with `{ all: true }` (see below), both IPv4 and IPv6
992-
addresses are returned. **Default:** `0`.
992+
value `0` is used with `{ all: true }` (see below), either one of or both
993+
IPv4 and IPv6 addresses are returned, depending on the system's DNS
994+
resolver. **Default:** `0`.
993995
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
994996
flags may be passed by bitwise `OR`ing their values.
995997
* `all` {boolean} When `true`, the `Promise` is resolved with all addresses in
@@ -1013,8 +1015,8 @@ changes:
10131015

10141016
Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
10151017
AAAA (IPv6) record. All `option` properties are optional. If `options` is an
1016-
integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
1017-
and IPv6 addresses are both returned if found.
1018+
integer, then it must be `4` or `6` – if `options` is not provided, then
1019+
either IPv4 or IPv6 addresses, or both, are returned if found.
10181020

10191021
With the `all` option set to `true`, the `Promise` is resolved with `addresses`
10201022
being an array of objects with the properties `address` and `family`.

0 commit comments

Comments
 (0)