- From: mieszko4 <notifications@github.com>
- Date: Tue, 17 Mar 2020 14:05:38 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 17 March 2020 21:05:50 UTC
My problem is somehow related.
For me `searchParams.set("param", undefined)` should stringify to `param` (without `=` sign)
## Reasoning
Take a look at example `?param1=¶m2` (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