Skip to content

Commit

Permalink
dns: refactor lib/internal/dns/utils.js
Browse files Browse the repository at this point in the history
* alphabetize contenst of `resolverKeys` array
* less line-wrapping for increased code clarity

PR-URL: nodejs#27006
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott committed Apr 1, 2019
1 parent c6faf5b commit c88d957
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/internal/dns/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ class Resolver {

if (ipVersion !== 0) {
const port =
parseInt(serv.replace(addrSplitRE, '$2')) ||
IANA_DNS_PORT;
parseInt(serv.replace(addrSplitRE, '$2')) || IANA_DNS_PORT;
return newSet.push([ipVersion, match[1], port]);
}
}
Expand Down Expand Up @@ -103,18 +102,18 @@ let defaultResolver = new Resolver();
const resolverKeys = [
'getServers',
'resolve',
'resolveAny',
'resolve4',
'resolve6',
'resolveAny',
'resolveCname',
'resolveMx',
'resolveNaptr',
'resolveNs',
'resolveTxt',
'resolveSrv',
'resolvePtr',
'resolveNaptr',
'resolveSoa',
'reverse'
'resolveSrv',
'resolveTxt',
'reverse',
];

function getDefaultResolver() {
Expand Down

0 comments on commit c88d957

Please sign in to comment.