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 <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
  • Loading branch information
Trott authored and BethGriggs committed Apr 10, 2019
1 parent 64a74d5 commit 96e429a
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 96e429a

Please sign in to comment.