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: #27006
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Signed-off-by: Beth Griggs <[email protected]>
  • Loading branch information
Trott authored and BethGriggs committed Apr 9, 2019
1 parent c4b790b commit af3ce38
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 af3ce38

Please sign in to comment.