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

I agree. I would aim for consistency with the existing behavior of `URLSearchParams` functions.

`URLSearchParams.delete(key)` deletes all entries with matching `key`
```js
const params = new URLSearchParams('foo=1&foo=2&bar=3&bar=3');
params.delete('foo');
params.toString(); // 'bar=3&bar=3'
```

`URLSearchParams.delete(key, value)` deletes all entries with matching `key` and `value`
```js
const params = new URLSearchParams('foo=1&foo=2&bar=3&bar=3');
params.delete('bar', '3');
params.toString(); // 'foo=1&foo=2'
```

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

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

Received on Thursday, 1 December 2022 10:17:18 UTC