Utility to easily compose urls
I did this project only for fun. If you wish to create and manage a URL, please "use the platform": https://v19i.com/posts/use-the-platform-url-api/
Initialise it by providing a base url:
const builder = new URLBuilder("https://a.valid.url/with/a/long/path");
Add or replace a search params:
builder.search.set("key", "value");
Get an encoded url:
builder.URL; // -> https://a.valid.url/with/a/long/path?key=value
Remove a search param:
builder.search.delete("key");