Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
revert changes in internal/net to fix perf regression
  • Loading branch information
aduh95 committed Jun 20, 2022
commit b3fad292270a38df785397f016b230557ca8ec6b
6 changes: 3 additions & 3 deletions lib/internal/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const {
RegExp,
RegExpPrototypeExec,
RegExpPrototypeTest,
Symbol,
} = primordials;

Expand All @@ -29,11 +29,11 @@ const IPv6Reg = new RegExp('^(' +
')(%[0-9a-zA-Z-.:]{1,})?$');

function isIPv4(s) {
return RegExpPrototypeExec(IPv4Reg, s) !== null;
return RegExpPrototypeTest(IPv4Reg, s);
}

function isIPv6(s) {
return RegExpPrototypeExec(IPv6Reg, s) !== null;
return RegExpPrototypeTest(IPv6Reg, s);
}

function isIP(s) {
Expand Down