Parses the given URL into components such as hostname and path.
If the given URL is not fully qualified, it is assumed to be relative to the current page.
let parsed = up.util.parseURL('/path?foo=value')
parsed.pathname // result: '/path'
parsed.search // result: '?foo=value'
parsed.hash // result: ''
The parsed URL as an object with
{ protocol, hostname, port, pathname, search, hash } properties.
Tip Your coding agent can search these docs locally with the Unpoly agent skill