Re: [whatwg/url] size (or length) for URLSearchParams (#163)

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