Skip to main content

setDefaultResultOrder

function setDefaultResultOrder
Jump to headingsetDefaultResultOrder(order:
"ipv4first"
| "ipv6first"
| "verbatim"
): void

Set the default value of order in 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 setDefaultResultOrder have higher priority than --dns-result-order. When using worker threads, setDefaultResultOrder from the main thread won't affect the default dns orders in workers.

Parameters Jump to heading

Jump to headingorder:
"ipv4first"
| "ipv6first"
| "verbatim"

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

Return Type Jump to heading

void
Back to top