| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Do we need a check that args[0] is a string here?
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think so. Utf8Value calls ToString under the hood, should be fine.
Sorry, something went wrong.
There was a problem hiding this comment.
maybe include a test passing null, an object, and a number? Just a suggestion
Sorry, something went wrong.
|
LGTM with a suggestion |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Is there a reason why you don't just assign it as exports.isIPv4 = cares.isIPv4; ?
Sorry, something went wrong.
There was a problem hiding this comment.
No particular reason, but I've just added check for symbol in js, so wrapper is necessary
Sorry, something went wrong.
There was a problem hiding this comment.
What about now?
Sorry, something went wrong.
|
Added some tests and also support for symbols. PTAL |
Sorry, something went wrong.
|
Still LGTM. I think the symbol changes should make it semver-major though. |
Sorry, something went wrong.
|
@evanlucas well, I don't think so. It seems like an oversight, so just a bug. |
Sorry, something went wrong.
|
Do we really expect people to pass symbols to APIs that are expecting a string? I think this check there is penaltizing the common case. Otherwise LGTM. |
Sorry, something went wrong.
|
I think the additional checks for symbols should be in a separate pr/commit since those should be semver-major. We are going from throwing an error, to not throwing an error. The performance changes should be in it's own commit, so it can be backported. Thoughts? |
Sorry, something went wrong.
Definitely, it's not hard.
It's exactly what bug fixing usually does :-) |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead.
|
Removed controversial commit, squashed and rebased. PTAL |
Sorry, something went wrong.
|
Still LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
Marking this as a watch for v4 but want to hold off a bit before landing, just to be safe. /cc @thealphanerd |
Sorry, something went wrong.
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: #5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: #5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: #5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: #5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: #5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
| Back | FazBrowse Home | New Git URL |
Pull Request check-list
this change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
net
Description of change
isIPv4 and isIPv6 are implemented on top of isIP, which in turn
checks the sting for being both IPv4 and IPv6, which can be inefficient
in some scenarios. This commit makes them use uv_inet_pton directly
instead.