parseUrl = (url) => {
    let parsedUrl = {
        protocol: null,
        host: null,
        port: null,
        hostname: null,
        query: null,
        href: null
    }
    try {
        if (!url) { return parsedUrl }
        parsedUrl = new URL(url)
    } catch (error) {
        // dont throw error
    }
    return parsedUrl
}
Parse a URL into its components.
@param {String} url The URL to parse
@returns {URL}