diff options
author | Rich Trott <rtrott@gmail.com> | 2019-03-30 06:10:57 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-04-02 02:58:22 +0300 |
commit | c88d9577bb1adb8265f48b4a0c6b80a16f448d32 (patch) | |
tree | 12fd9cb5bd5a0d924ddb44754e9a2dfd177d2649 /lib/internal/dns | |
parent | c6faf5b64ece3281dbef9c6efb381ace3b6698ae (diff) |
dns: refactor lib/internal/dns/utils.js
* alphabetize contenst of `resolverKeys` array
* less line-wrapping for increased code clarity
PR-URL: https://github.com/nodejs/node/pull/27006
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib/internal/dns')
-rw-r--r-- | lib/internal/dns/utils.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js index d279a588401..70097663546 100644 --- a/lib/internal/dns/utils.js +++ b/lib/internal/dns/utils.js @@ -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]); } } @@ -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() { |