Compact URL builder
Path segments
Escaping /^\.{1,2}$/is possible, but it is better avoid making it first in the path segments. (e.g. prefixing with ~)
Fragment (hash)
Escaping /^\.{1,2}$/is possible, but it is better avoid making it first in the path segments. (e.g. prefixing with ~)
makeUrl function, using basic string concatenation.
/ parseUrl function, based on WHATWG URL constructor's properties
Parsed and validated with decodeURIComponent
Path segments (pathname)
Querystring (search)
Looping through URL.searchPararms
Fragment (hash)