up.util.parseURL(the)
JavaScript function
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.
Example
let parsed = up.util.parseURL('/path?foo=value')
parsed.pathname // result: '/path'
parsed.search // result: '?foo=value'
parsed.hash // result: ''
Parameters
the
Return value
The parsed URL as an object with
{ protocol, hostname, port, pathname, search, hash } properties.
Type: Object