From af3ce38902ebe6316fdba71e7b26c0e2eae9cf64 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 29 Mar 2019 20:10:57 -0700 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Signed-off-by: Beth Griggs --- lib/internal/dns/utils.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js index d279a58840154e..70097663546a1a 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() {