Skip to content

Feature request: query-string strip (pick, exclude) #259

Closed
@zhangciwu

Description

@zhangciwu

To 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions