[whatwg/url] Option to avoid unnecessary trailing ='s in search params (#594)

```js
`${new URLSearchParams({x: '', y: ''})}`
// "x=&y="
```

It would be great to have an option to trim = signs when there's no value, even better when the value is null/undefined

Proposal:
```js
`${new URLSearchParams({x: '', y: ''}, {compact: true})}`
// "x&y"
```
```js
`${new URLSearchParams({x: '', y: undefined}, {compact: 'nullish'})}`
// "x=&y"
```

-- 
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/594

Received on Friday, 16 April 2021 15:30:38 UTC