Re: [whatwg/url] URLSearchParams delete all vs delete one (#335)

I'm not sure the correct way to give an "indication of common need" but I would like to add my voice to those expecting `delete(key, value)` to be an option.

To give a concrete use case: 

A query string containing filters that can have multiple. Such as `?author=Alice&author=Bob`. Originally these were used as a single value `?authors=alice-bob` but for various reasons (including querystring on NodeJS being deprecated) I looked into `URLSearchParams` to replace it and saw the ability to use `getAll` which seems an obvious case for this scenario.

But when wanting to delete a filter, it seems over the top to need to manipulate the array to rebuild the query just to delete one of the options. 


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/335#issuecomment-1142139561
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/335/1142139561@github.com>

Received on Tuesday, 31 May 2022 13:30:42 UTC