From 3ae4377a4711e2814dad1080acefda5fffe1def9 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 29 Jun 2016 23:33:00 +0530 Subject: [PATCH] net: export isIPv4, isIPv6 directly from cares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function objects encapsulating `isIPv4` and `isIPv6` are not necessary. They can be directly exposed from `cares`. PR-URL: https://github.com/nodejs/node/pull/7481 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- lib/net.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/net.js b/lib/net.js index d64a264f96..24766eefce 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1582,14 +1582,10 @@ Server.prototype.unref = function() { exports.isIP = cares.isIP; -exports.isIPv4 = function(input) { - return cares.isIPv4(input); -}; +exports.isIPv4 = cares.isIPv4; -exports.isIPv6 = function(input) { - return cares.isIPv6(input); -}; +exports.isIPv6 = cares.isIPv6; if (process.platform === 'win32') {