From 1dae1873d9e68f22a8b6f87da5776d8ebebc3fde Mon Sep 17 00:00:00 2001 From: Duncan Chiu <64763059+duncanchiu409@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:50:39 +1030 Subject: [PATCH] doc: fix `dns.lookup` and `dnsPromises.lookup` description PR-URL: https://github.com/nodejs/node/pull/51517 Fixes: https://github.com/nodejs/node/issues/51482 Reviewed-By: Paolo Insogna Reviewed-By: Matteo Collina --- doc/api/dns.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index d6209fa19ef628..25709994e1bcc3 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -204,8 +204,9 @@ changes: * `options` {integer | Object} * `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4` - and `6` respectively. The value `0` indicates that IPv4 and IPv6 addresses - are both returned. **Default:** `0`. + and `6` respectively. The value `0` indicates that either an IPv4 or IPv6 + address is returned. If the value `0` is used with `{ all: true } (see below)`, + both IPv4 and IPv6 addresses are returned. **Default:** `0`. * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple flags may be passed by bitwise `OR`ing their values. * `all` {boolean} When `true`, the callback returns all resolved addresses in @@ -951,8 +952,9 @@ added: v10.6.0 * `hostname` {string} * `options` {integer | Object} * `family` {integer} The record family. Must be `4`, `6`, or `0`. The value - `0` indicates that IPv4 and IPv6 addresses are both returned. **Default:** - `0`. + `0` indicates that either an IPv4 or IPv6 address is returned. If the + value `0` is used with `{ all: true }` (see below), both IPv4 and IPv6 + addresses are returned. **Default:** `0`. * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple flags may be passed by bitwise `OR`ing their values. * `all` {boolean} When `true`, the `Promise` is resolved with all addresses in