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

Method getServers

lib/internal/dns/utils.js:99–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 }
98
99 getServers() {
100 return ArrayPrototypeMap(this._handle.getServers() || [], (val) => {
101 if (!val[1] || val[1] === IANA_DNS_PORT)
102 return val[0];
103
104 const host = isIP(val[0]) === 6 ? `[${val[0]}]` : val[0];
105 return `${host}:${val[1]}`;
106 });
107 }
108
109 setServers(servers) {
110 validateArray(servers, 'servers');

Callers 4

[kSetServersInternal]Method · 0.80
test-dns.jsFile · 0.80

Calls 1

isIPFunction · 0.85

Tested by

no test coverage detected