◐ Shell
clean mode source ↗

doc: clarify dns.lookup() callback signature when all is true · nodejs/node@9c700f3

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