Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prefer net.isIPv4 over custom function #443

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

EvanHahn
Copy link
Contributor

This replaces our custom isIpv4 function with net.isIPv4, which is built into Node.

net.isIPv4 is stricter than ours (see Node's source), but it's the same basic thing.

This replaces our custom `isIpv4` function with [`net.isIPv4`][0], which
is built into Node.

[0]: https://nodejs.org/api/net.html#netisipv4input
@EvanHahn EvanHahn marked this pull request as ready for review January 22, 2024 21:37
Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great I was not aware of this function! Thanks.

@EvanHahn EvanHahn merged commit d8f4039 into main Jan 22, 2024
7 checks passed
@EvanHahn EvanHahn deleted the use-net.isIPv4 branch January 22, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants