sindresorhus/normalize-url

Require TLD

Closed this issue · 3 comments

Thoughts on adding a feature to require TLD's in the url? It would raise an error on http://google but not http://google.com or http://google.abcdefg

I can make a PR if that direction makes sense.

Why? What's the use-case?

he1d1 commented

If I'm understanding the issue, someone could buy google.foo and spoof it.

I'm going to pass on this. This package is about normalization, not validation.