- From: Tab Atkins Jr. <notifications@github.com>
- Date: Fri, 13 Jan 2023 09:27:06 -0800
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 13 January 2023 17:27:18 UTC
That said, since the behavior of `[...url.searchParams]` is to produce a list of entries, I think the clear winner between "count distinct keys" and "count entries" is the latter; aka [the earlier example](https://github.com/whatwg/url/issues/163#issuecomment-258843728) should return 3. URLSearchParams doesn't provide any simple way to get just the distinct keys; for that you need to manually uniquify them with, say, `[...new Set(URLSearchParams.keys())]`. So it shouldn't bias towards counting unique keys. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/163#issuecomment-1382166943 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/163/1382166943@github.com>
Received on Friday, 13 January 2023 17:27:18 UTC