sindresorhus / normalize-url

Normalize a URL
MIT License
840 stars 122 forks source link

Add `removeAllQueryParameters` option #89

Closed arisanguinetti closed 5 years ago

arisanguinetti commented 5 years ago

I think this is useful. Sometimes when normalizing URLs, all parameters need to be removed.

sindresorhus commented 5 years ago

Needs to be documented in the readme too.

arisanguinetti commented 5 years ago

I've updated the Readme file as well.

sindresorhus commented 5 years ago

Can you fix the merge conflict?

sindresorhus commented 5 years ago

Still not fixed.

sindresorhus commented 5 years ago

Ping

LeCoupa commented 4 years ago

For people trying to achieve this, you can just do:

normalizeUrl(url, {
  removeQueryParameters: [/(.*?)/]
});