Skip to content

IPv6 is mangled in parsed 'hostname' #2288

@aoxborrow

Description

@aoxborrow

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions