Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80ca063

Browse filesBrowse 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 <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>
1 parent 447a8f2 commit 80ca063
Copy full SHA for 80ca063

File tree

Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Open diff view settings
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+2-6Lines 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-
return cares.isIPv4(input);
1586-
};
1584+
exports.isIPv4 = cares.isIPv4;
15871585

15881586

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

15931589

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.