setDefaultResultOrder

Set the default value of order in {@link lookup} and dnsPromises.lookup(). The value could be:

  • ipv4first: sets default order to ipv4first.

  • ipv6first: sets default order to ipv6first.

  • verbatim: sets default order to verbatim.

The default is verbatim and {@link setDefaultResultOrder} have higher priority than --dns-result-order. When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.

Since

v16.4.0, v14.18.0

Parameters

order

must be 'ipv4first', 'ipv6first' or 'verbatim'.