Re: [whatwg/url] searchParams.set("param", undefined) should not stringify as param=undefined (#427)

My problem is somehow related.
For me `searchParams.set("param", undefined)` should stringify to `param` (without `=` sign)

## Reasoning
Take a look at example `?param1=&param2` (note only one `=`)
For me these two params have different values:
* value of `param1` is empty string
* value of `param2` is `undefined`

Currently I am not able to render url search query without `=` using `URLSearchParams` which makes the url look ugly.

Any thoughts? Am I missing something?

## Another approach
Another approach for solving my problem would be having something like `.toString({ skipRenderingEqualSingForParamsWithEmptyValue: true })`

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

Received on Tuesday, 17 March 2020 21:05:50 UTC