The interface for a URL object

interface IUrl {
    hash: string;
    host: string;
    hostname: string;
    href: string;
    pathname: string;
    port: string;
    protocol: string;
    search?: string;
}

Properties

hash: string

The "fragment" portion of the URL including the leading ASCII hash (#) character

host: string

The full lower-cased host portion of the URL, including the port if specified.

hostname: string

The lower-cased host name portion of the host component without the port included.

href: string

The full URL string that was parsed with both the protocol and host components converted to lower-case.

pathname: string

The entire path section of the URL.

port: string

The numeric port portion of the host component.

protocol: string

Identifies the URL's lower-cased protocol scheme.

search?: string

The search element, including leading question mark ('?'), if any, of the URL.