paoloricciuti / sveltekit-search-params

The easiest way to read and WRITE from query parameters in sveltekit.
https://sveltekit-search-params.netlify.app
MIT License
549 stars 19 forks source link

Allow encoding as undefined to remove param #36

Closed Dragon-Hatcher closed 1 year ago

Dragon-Hatcher commented 1 year ago

Describe the problem

If there is a default version of a parameter it can be nice to not have it show up in the URL.

Describe the proposed solution

If encode returns undefined delete the parameter from the url.

enesbala5 commented 1 year ago

Please accept the PR. This change is really important.

paoloricciuti commented 1 year ago

Uh sorry everyone I completely missed this... tomorrow I'll review and eventually merge the pr ;)