sindresorhus / normalize-url

Normalize a URL
MIT License
837 stars 123 forks source link

Normalize domain names to lowercase #98

Closed millette closed 4 years ago

millette commented 4 years ago

Since domain names are case insensitive, I'd like an option to normalize "SindreSorhus.com" into "http://sindresorhus.com" while keeping the path and query strings intact.

It would make finding duplicate URLs slightly easier.

sindresorhus commented 4 years ago

I don’t think there’s any reason for an option for this. Lets make it default behavior and do a major release.

millette commented 4 years ago

Even better :-) I can take a stab at a PR if no-one else is.

millette commented 4 years ago

See #99 - although it already works as expected. I only added a test.