Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 030f56e

Browse filesBrowse files
domdomeggtargos
authored andcommitted
doc: fix dns.lookup family 0 and all descriptions
PR-URL: #51653 Fixes: #51482 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 5d91cf1 commit 030f56e
Copy full SHA for 030f56e

File tree

Expand file treeCollapse file tree

1 file changed

+10
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-8
lines changed
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+10-8Lines changed: 10 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ changes:
208208
* `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For
209209
backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4`
210210
and `6` respectively. The value `0` indicates that either an IPv4 or IPv6
211-
address is returned. If the value `0` is used with `{ all: true } (see below)`,
212-
both IPv4 and IPv6 addresses are returned. **Default:** `0`.
211+
address is returned. If the value `0` is used with `{ all: true }` (see
212+
below), either one of or both IPv4 and IPv6 addresses are returned,
213+
depending on the system's DNS resolver. **Default:** `0`.
213214
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
214215
flags may be passed by bitwise `OR`ing their values.
215216
* `all` {boolean} When `true`, the callback returns all resolved addresses in
@@ -238,8 +239,8 @@ changes:
238239

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

244245
With the `all` option set to `true`, the arguments for `callback` change to
245246
`(err, addresses)`, with `addresses` being an array of objects with the
@@ -980,8 +981,9 @@ changes:
980981
* `options` {integer | Object}
981982
* `family` {integer} The record family. Must be `4`, `6`, or `0`. The value
982983
`0` indicates that either an IPv4 or IPv6 address is returned. If the
983-
value `0` is used with `{ all: true }` (see below), both IPv4 and IPv6
984-
addresses are returned. **Default:** `0`.
984+
value `0` is used with `{ all: true }` (see below), either one of or both
985+
IPv4 and IPv6 addresses are returned, depending on the system's DNS
986+
resolver. **Default:** `0`.
985987
* `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
986988
flags may be passed by bitwise `OR`ing their values.
987989
* `all` {boolean} When `true`, the `Promise` is resolved with all addresses in
@@ -1005,8 +1007,8 @@ changes:
10051007

10061008
Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
10071009
AAAA (IPv6) record. All `option` properties are optional. If `options` is an
1008-
integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
1009-
and IPv6 addresses are both returned if found.
1010+
integer, then it must be `4` or `6` – if `options` is not provided, then
1011+
either IPv4 or IPv6 addresses, or both, are returned if found.
10101012

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.