ufo icon indicating copy to clipboard operation
ufo copied to clipboard

Introduce `filterQuery` util

Open fmoessle opened this issue 1 year ago • 3 comments

Describe the feature

keepQuery(input: string, keep string | string[]) Removes all queries not specified in parameter keep

Example: keepQuery('/path?foo=a&bar=b', 'bar') // "/path?bar=b"

and

withoutQuery(input: string, without string | string[]) Keeps all queries other than specified in parameter without

Example: withoutQuery('/path?foo=a&bar=c', 'bar') // "/path?foo=a"

Additional information

  • [X] Would you be willing to help implement this feature?

fmoessle avatar Apr 05 '24 20:04 fmoessle

Hi thanks for idea. I think we can aggregate both to something like filterQuery(input, fn) wdyt?

But also can you please explain when you think this feature would benefit a share usecase for projects?

pi0 avatar Apr 08 '24 12:04 pi0