Skip to content
New issue

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

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

Already on GitHub? # to your account

IPv6 is mangled in parsed 'hostname' #2288

Open
aoxborrow opened this issue Feb 28, 2025 · 0 comments
Open

IPv6 is mangled in parsed 'hostname' #2288

aoxborrow opened this issue Feb 28, 2025 · 0 comments

Comments

@aoxborrow
Copy link

I know you don't intend this to be a parse everything library, but I would like to second #2044. Would be nice to have isIp, isIpv6, isIpv4, & getIp so I don't need to create my own or bring in another library. Lemme know if you'd accept a PR. (It would be nice to have a very simplified TS version of ipaddr.js)

yarn dlx tldts '2a01:e35:2f22:e3d0::1'
{
  "domain": null,
  "domainWithoutSuffix": null,
  "hostname": "2a01:e35:2f22:e3d0:", <-- missing  ':1' from end of IP
  "isIcann": null,
  "isIp": true,
  "isPrivate": null,
  "publicSuffix": null,
  "subdomain": null
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant