Skip to content

Commit

Permalink
net: export isIPv4, isIPv6 directly from cares
Browse files Browse the repository at this point in the history
The function objects encapsulating `isIPv4` and `isIPv6` are not
necessary. They can be directly exposed from `cares`.

PR-URL: #7481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
thefourtheye authored and Myles Borins committed Aug 30, 2016
1 parent bff9ec8 commit deec06b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit deec06b

Please sign in to comment.