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
- nstd: 5/31 of Node's own eligible tests pass under nstd (filed under
dns, the parent module). - Browser: Loads with a minimal
processobject. 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,
undefinedthe other. - ❔
undefinedboth ways. - ❌ Not exported at all.
- – Not measured.
Show all 46 exports
| Export | Node.js | Browser |
|---|---|---|
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 hostfetch.lookup,resolve4/6/Cname/Ns/Ptr/Txt/Mx/Srv/Soaandreverseare real.lookupService,setServers,setLocalAddressandresolveAny/Naptr/Tlsa/Caareject 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 underdns, the parent module).