From deec06ba54ee3436bcf711f0457c83a12e035e9e 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 c1de0384ea42a9..f32af94fbf94e1 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1569,14 +1569,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') {