Feature request: query-string strip (`pick`, `exclude`)
See original GitHub issueTo eliminate unneeded params, preserve only needed
queryString.strip('http://example.com/?a=1&b=2', [ 'a' ] )
// result : http://example.com/?a=1
It would be helpful when page has many redudant params (like statistic params) and want to get a cleaner one
Better function names from @Uzlopak:
queryString.pick('http://example.com/?a=1&b=2', [ 'a' ] )
// result : http://example.com/?a=1
queryString.exclude('http://example.com/?a=1&b=2', [ 'a' ] )
// result : http://example.com/?b=2
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
How To Exclude URL Query Parameters in Google Analytics
Under Admin > View Settings > Exclude Query Parameters, list the query parameters that you want to exclude from your page paths. This...
Read more >How to Exclude Query String Parameters from Google ... - Elevar
Option 1: Create Filter to Exclude All Query Parameters. This is done through a Search and Replace filter that you can set on...
Read more >How to Exclude URL Query Parameters in Google Analytics
Also, remember that search query parameters are case sensitive. Step-3: Select the checkbox 'Strip query parameters out of URL':.
Read more >Efficient removing of QueryString parameters #23971 - GitHub
I'm currently working on pull request microsoft/reverse-proxy#301 for YARP to add support for transforming query parameters on the incoming ...
Read more >Remove querystring from URL - javascript - Stack Overflow
An easy way to get this is: function getPathFromUrl(url) { return url.split("?")[0]; }. For those who also wish to remove the hash (not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The python
strip
equivalent in javacscript would betrim
If anyone wants to work on this, see the initial attempt and feedback in https://github.com/sindresorhus/query-string/pull/261.