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 1cd3694

Browse filesBrowse files
galaxy4276claude
authored andcommitted
doc: clarify dns.lookup() callback signature when all is true
Document the `addresses` argument returned by the callback when `options.all` is true, and note that `address` and `family` are not provided in that case. Fixes #57355 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> PR-URL: #62800 Fixes: #57355 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com>
1 parent bdee0a8 commit 1cd3694
Copy full SHA for 1cd3694

1 file changed

+6Lines changed: 6 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,15 @@ changes:
277277
* `callback` {Function}
278278
* `err` {Error}
279279
* `address` {string} A string representation of an IPv4 or IPv6 address.
280+
Not provided when `options.all` is `true`.
280281
* `family` {integer} `4` or `6`, denoting the family of `address`, or `0` if
281282
the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
282283
bug in the name resolution service used by the operating system.
284+
Not provided when `options.all` is `true`.
285+
* `addresses` {Object\[]} An array of address objects when `options.all` is
286+
`true`. Each object has the following properties:
287+
* `address` {string} A string representation of an IPv4 or IPv6 address.
288+
* `family` {integer} `4` or `6`, denoting the family of `address`.
283289

284290
Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
285291
AAAA (IPv6) record. All `option` properties are optional. If `options` is an

0 commit comments

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