sindresorhus/normalize-url

Strip text fragment option

Closed this issue · 3 comments

https://web.dev/text-fragments/. Text fragments are currently supported in Edge, Chrome, and some mobile browsers. Google use/used them in search results.

Expected behaviour:

I currently need to do this but I'm not sure many will so maybe it's not worth having to maintain an option for it.

Yeah, good idea. PR welcome.

Example of what's required to add an option: 18effbe

So it would be a new option? E.g.

normalizeUrl('...', {stripHash: false, stripTextFragment: true});

Correct