node:dns/promises

#Import

import dns_promises from "nstdlib/node/dns/promises";

Note

Behaves like Node.js. Queries run over DNS-over-HTTPS on the host fetch. lookup, resolve4/6/Cname/Ns/Ptr/Txt/Mx/Srv/Soa and reverse are real. lookupService, setServers, setLocalAddress and resolveAny/Naptr/Tlsa/Caa reject by name.

#Support

node:dns/promises. nstd: some support; Node test suite 16.1% passing. Browser: not tested; export coverage 100%; Node test suite 16.1% passing.

  • nstd: 5/31 of Node's own eligible tests pass under nstd (filed under dns, the parent module).
  • Browser: Loads with a minimal process object. 46 of Node's 46 exports are available. No behavior check covers it yet.

#Exports (46)

Every name Node.js exports from this module, and what you get when you read it, as a named import or as a property of the default import:

  • ✅ A value, both ways. An export that throws an error naming the missing feature also counts.
  • ⚠️ A value one way, undefined the other.
  • ❔ undefined both ways.
  • ❌ Not exported at all.
  • – Not measured.
Show all 46 exports
ExportNode.jsBrowser
ADDRGETNETWORKPARAMS✅✅
BADFAMILY✅✅
BADFLAGS✅✅
BADHINTS✅✅
BADNAME✅✅
BADQUERY✅✅
BADRESP✅✅
BADSTR✅✅
CANCELLED✅✅
CONNREFUSED✅✅
DESTRUCTION✅✅
EOF✅✅
FILE✅✅
FORMERR✅✅
LOADIPHLPAPI✅✅
NODATA✅✅
NOMEM✅✅
NONAME✅✅
NOTFOUND✅✅
NOTIMP✅✅
NOTINITIALIZED✅✅
REFUSED✅✅
Resolver✅✅
SERVFAIL✅✅
TIMEOUT✅✅
getDefaultResultOrder✅✅
getServers✅✅
lookup✅✅
lookupService✅✅
resolve✅✅
resolve4✅✅
resolve6✅✅
resolveAny✅✅
resolveCaa✅✅
resolveCname✅✅
resolveMx✅✅
resolveNaptr✅✅
resolveNs✅✅
resolvePtr✅✅
resolveSoa✅✅
resolveSrv✅✅
resolveTlsa✅✅
resolveTxt✅✅
reverse✅✅
setDefaultResultOrder✅✅
setServers✅✅

#Diagnostics

nstdlib running inside Node.js. This isn't an environment it's meant for, so it isn't shown above, but it tells a library problem from an environment one:

  • coverage: 46/46 of the host's export names answer inside host node. Behaviour verified against the host builtin. Queries run over DNS-over-HTTPS on the host fetch. lookup, resolve4/6/Cname/Ns/Ptr/Txt/Mx/Srv/Soa and reverse are real. lookupService, setServers, setLocalAddress and resolveAny/Naptr/Tlsa/Caa reject by name.
  • smoke: Imports in a clean child process.
  • node-suite: 5/31 of Node's own eligible tests pass with ./dist inside host node. A failure there and in the page is the library's, one only in the page is the engine's (filed under dns, the parent module).