Skip to content

IPv6 is mangled in parsed 'hostname' #2288

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

Open
aoxborrow opened this issue Feb 28, 2025 · 1 comment
Open

IPv6 is mangled in parsed 'hostname' #2288

aoxborrow opened this issue Feb 28, 2025 · 1 comment

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
}
@remusao
Copy link
Owner

remusao commented Mar 26, 2025

Hi, thanks for reaching out. I'd definitely welcome contributions but would like to first have a discussion on the planned change to make sure we align on the direction. Happy to discuss further.

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

No branches or pull requests

2 participants