MCPcopy Index your code
hub / github.com/nodejs/node / resolve

Function resolve

lib/internal/dns/promises.js:350–365  ·  view source on GitHub ↗
(hostname, rrtype)

Source from the content-addressed store, hash-verified

348}
349
350function resolve(hostname, rrtype) {
351 let resolver;
352
353 if (rrtype !== undefined) {
354 validateString(rrtype, 'rrtype');
355
356 resolver = resolveMap[rrtype];
357
358 if (typeof resolver !== 'function')
359 throw new ERR_INVALID_ARG_VALUE('rrtype', rrtype);
360 } else {
361 resolver = resolveMap.A;
362 }
363
364 return FunctionPrototypeCall(resolver, this, hostname);
365}
366
367// Promise-based resolver.
368const { Resolver, resolveMap } = createResolverClass(resolver);

Callers 15

createLookupPromiseFunction · 0.70
questionMethod · 0.50
fnFunction · 0.50
setupCoverageHooksFunction · 0.50
requestMethod · 0.50
readNextFunction · 0.50
stopMethod · 0.50
stopMethod · 0.50
getHeapSnapshotMethod · 0.50
getHeapStatisticsMethod · 0.50
cpuUsageMethod · 0.50
startCpuProfileMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…