function setDefaultResultOrder
Usage in Deno
import { setDefaultResultOrder } from "node:dns/promises";
setDefaultResultOrder(order: "ipv4first" | "verbatim"): void
Set the default value of verbatim
in dns.lookup()
and dnsPromises.lookup()
. The value could be:
ipv4first
: sets defaultverbatim
false
.verbatim
: sets defaultverbatim
true
.
The default is verbatim
and dnsPromises.setDefaultResultOrder()
have higher priority than --dns-result-order
.
When using worker threads, dnsPromises.setDefaultResultOrder()
from the main thread won't affect the default dns orders in workers.
void