When true, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
interface
dns.LookupOneOptions
interface LookupOneOptions
- all?: false
- family?: number | 'IPv4' | 'IPv6'
The record family. Must be
4,6, or0. For backward compatibility reasons,'IPv4'and'IPv6'are interpreted as4and6respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value0is used with{ all: true } (see below), both IPv4 and IPv6 addresses are returned. - hints?: number
One or more supported
getaddrinfoflags. Multiple flags may be passed by bitwiseORing their values. - order?: 'ipv4first' | 'ipv6first' | 'verbatim'
When
verbatim, the resolved addresses are return unsorted. Whenipv4first, the resolved addresses are sorted by placing IPv4 addresses before IPv6 addresses. Whenipv6first, the resolved addresses are sorted by placing IPv6 addresses before IPv4 addresses. Default value is configurable using setDefaultResultOrder or--dns-result-order.