Read a URL's parameters as JSON, or build a query string from an object, with repeated keys handled as the arrays they are.
The result appears hereIt becomes an array. tag=jazz&tag=harp is two values for one key, and an object with one of them silently dropped is how half the pagination bugs on the web start.
Yes. Everything before the ? is ignored, so you can paste the address straight out of the bar.
Yes, by URLSearchParams itself, which is the browser's own implementation: %20 and + both come back as spaces, and going the other way the values are escaped properly.