Skip to content

Commit 80ca063

Browse files
thefourtheyeevanlucas
authored andcommitted
net: export isIPv4, isIPv6 directly from cares
The function objects encapsulating `isIPv4` and `isIPv6` are not necessary. They can be directly exposed from `cares`. PR-URL: #7481 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 447a8f2 commit 80ca063

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎lib/net.js‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,14 +1581,10 @@ Server.prototype.unref = function(){
15811581
exports.isIP=cares.isIP;
15821582

15831583

1584-
exports.isIPv4=function(input){
1585-
returncares.isIPv4(input);
1586-
};
1584+
exports.isIPv4=cares.isIPv4;
15871585

15881586

1589-
exports.isIPv6=function(input){
1590-
returncares.isIPv6(input);
1591-
};
1587+
exports.isIPv6=cares.isIPv6;
15921588

15931589

15941590
if(process.platform==='win32'){

0 commit comments

Comments
(0)