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

I'm trying to consider this in light of what an eventual JS multimap might look like too, so I'm assuming all use-cases are valid a priori right now.

My issue here is that the existing methods that duplicate Map methods all treat it like a normal Map, with a single value per key, while the methods that recognize this as a multimap all treat it like an ordered list of arbitrary values per key. If calling `params.append(k, v); params.append(k,v);` results in the key having two values, I don't think it's consistent to have `params.delete(k, v)` delete *both* of them with a single call. You'd be treating the values like they're a Set instead of an Array, but only for that one method.

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

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

Received on Tuesday, 29 November 2022 22:52:03 UTC