Skip to content

Commit 126a6c3

Browse files
duncanchiu409rdw-msft
authored andcommitted
doc: fix dns.lookup and dnsPromises.lookup description
PR-URL: nodejs#51517 Fixes: nodejs#51482 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 8aa163c commit 126a6c3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/api/dns.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ changes:
204204
* `options` {integer | Object}
205205
* `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For
206206
backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4`
207-
and `6` respectively. The value `0` indicates that IPv4 and IPv6 addresses
208-
are both returned. **Default:** `0`.
207+
and `6` respectively. The value `0` indicates that either an IPv4 or IPv6
208+
address is returned. If the value `0` is used with `{ all: true } (see below)`,
209+
both IPv4 and IPv6 addresses are returned. **Default:** `0`.
209210
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
210211
flags may be passed by bitwise `OR`ing their values.
211212
* `all` {boolean} When `true`, the callback returns all resolved addresses in
@@ -953,8 +954,9 @@ added: v10.6.0
953954
* `hostname` {string}
954955
* `options` {integer | Object}
955956
* `family` {integer} The record family. Must be `4`, `6`, or `0`. The value
956-
`0` indicates that IPv4 and IPv6 addresses are both returned. **Default:**
957-
`0`.
957+
`0` indicates that either an IPv4 or IPv6 address is returned. If the
958+
value `0` is used with `{ all: true }` (see below), both IPv4 and IPv6
959+
addresses are returned. **Default:** `0`.
958960
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
959961
flags may be passed by bitwise `OR`ing their values.
960962
* `all` {boolean} When `true`, the `Promise` is resolved with all addresses in

0 commit comments

Comments
 (0)