sindresorhus / normalize-url

Normalize a URL
MIT License
840 stars 122 forks source link

remove paths ending with / with removeDirectoryIndex #190

Open millette opened 5 months ago

millette commented 5 months ago

I had example.com/fr and I can remove the "/fr" part with removeDirectoryIndex. I also wanted to remove "/fr/" from example.com/fr/ but since it ends with a slash (and removeTrailingSlash doesn't help here) I can't remove that path suffix.