- From: James Bromwell <notifications@github.com>
- Date: Wed, 23 Nov 2022 13:12:37 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 23 November 2022 21:12:49 UTC
I think every use case presented could be addressed with clean ergonomics, without changing the meaning of any current methods, by adding: * `has(key, value)`: true if `key=value` is in the collection * `delete(key, value)`: deletes one random pair (as with Guava MultiMap). Could maybe return count of remaining `key=value` pairs, or just `has(key,value)`, instead of `undefined`? * `set(key, value1, value2, value3, ...)`: current `set` overwrites all values for the given key. Give it a rest parameter (like `Array#push`) and then I can write `url.set(key, ...url.getAll(key).filter(v => v !== value))`, which is effectively `deleteAll(key, value)` -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/335#issuecomment-1325661984 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/335/1325661984@github.com>
Received on Wednesday, 23 November 2022 21:12:49 UTC