Skip to content

Commit b630be2

Browse files
thefourtheyeMylesBorins
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 0e52861 commit b630be2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/net.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1569,14 +1569,10 @@ Server.prototype.unref = function() {
15691569
exports.isIP = cares.isIP;
15701570

15711571

1572-
exports.isIPv4 = function(input) {
1573-
return cares.isIPv4(input);
1574-
};
1572+
exports.isIPv4 = cares.isIPv4;
15751573

15761574

1577-
exports.isIPv6 = function(input) {
1578-
return cares.isIPv6(input);
1579-
};
1575+
exports.isIPv6 = cares.isIPv6;
15801576

15811577

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

0 commit comments

Comments
 (0)