@@ -277,19 +277,20 @@ changes:
277277* ` callback ` {Function}
278278 * ` err ` {Error}
279279 * ` address ` {string} A string representation of an IPv4 or IPv6 address.
280+ This argument is only provided when ` options.all ` is ` false ` .
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
282- bug in the name resolution service used by the operating system.
283+ bug in the name resolution service used by the operating system. This
284+ argument is only provided when ` options.all ` is ` false ` .
285+ * ` addresses ` {Object[ ] } Returned when ` options.all ` is ` true ` .
286+ * ` address ` {string} A resolved IPv4 or IPv6 address.
287+ * ` family ` {integer} ` 4 ` or ` 6 ` , denoting the family of ` address ` .
283288
284289Resolves a host name (e.g. ` 'nodejs.org' ` ) into the first found A (IPv4) or
285290AAAA (IPv6) record. All ` option ` properties are optional. If ` options ` is an
286291integer, then it must be ` 4 ` or ` 6 ` – if ` options ` is not provided, then
287292either IPv4 or IPv6 addresses, or both, are returned if found.
288293
289- With the ` all ` option set to ` true ` , the arguments for ` callback ` change to
290- ` (err, addresses) ` , with ` addresses ` being an array of objects with the
291- properties ` address ` and ` family ` .
292-
293294On error, ` err ` is an [ ` Error ` ] [ ] object, where ` err.code ` is the error code.
294295Keep in mind that ` err.code ` will be set to ` 'ENOTFOUND' ` not only when
295296the host name does not exist but also when the lookup fails in other ways
0 commit comments