Hacker News new | ask | show | jobs
by handy2000 926 days ago
There is a distinction to be made between a parseable string and a valid URL in more complete terms. While it's nice to have a new standard function that checks whether a string is parseable as a URL, it can't, of course, validate that string in terms of whether the TLD is a real one, and not something like "https://super.hacker/".

So maybe the post should have called it what it is: validating parse-ability, since the method itself is called "canParse()".

1 comments

super.hacker is a valid url.

Url validity isn't dictated by ICANN.