Skip to content

Commit 3ae4377

Browse files
committed
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 24ee0d2 commit 3ae4377

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
@@ -1582,14 +1582,10 @@ Server.prototype.unref = function() {
15821582
exports.isIP = cares.isIP;
15831583

15841584

1585-
exports.isIPv4 = function(input) {
1586-
return cares.isIPv4(input);
1587-
};
1585+
exports.isIPv4 = cares.isIPv4;
15881586

15891587

1590-
exports.isIPv6 = function(input) {
1591-
return cares.isIPv6(input);
1592-
};
1588+
exports.isIPv6 = cares.isIPv6;
15931589

15941590

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

0 commit comments

Comments
 (0)