url-vir - v2.1.6
    Preparing search index...

    Variable emptyUrlPartsConst

    emptyUrlParts: {
        fullPath: string;
        hash: string;
        host: string;
        hostname: string;
        href: string;
        origin: string;
        password: string;
        pathname: string;
        paths: string[];
        port: string;
        protocol: string;
        search: string;
        searchParams: Record<string, string[]>;
        username: string;
    } = ...

    An example of empty UrlParts for convenience's sake.

    Type Declaration

    • ReadonlyfullPath: string

      Includes:

      • Pathname
      • Search
      • Hash
    • Readonlyhash: string

      Everything after the hash (#), including the hash itself. If none exist, this will be an empty string.

      '#/my/hash/route'
      
    • Readonlyhost: string

      Includes:

      • Hostname
      • Port
    • Readonlyhostname: string

      Domain, subdomains, and TLD (.com).

    • Readonlyhref: string

      The full url string.

    • Readonlyorigin: string

      Includes:

      • Protocol
      • Hostname
      • Port
    • Readonlypassword: string

      Infrequently used password part of a url.

      BuildUrl('https://anonymous:my-pass@developer.mozilla.org').password === 'my-pass';
      
    • Readonlypathname: string

      Everything between origin and search/hash with a leading slash. If none exist, this will be simply '/'.

    • Readonlypaths: string[]

      Each path part of the pathname.

    • Readonlyport: string

      Port part of the URL. If none exist, this will be an empty string.

    • Readonlyprotocol: string

      Http, https, wss, etc.

    • Everything after a ?, excluding the hash, including ?, as a string. If none exist, this will be an empty string.

    • ReadonlysearchParams: Record<string, string[]>

      An object representation of the parameters contained within the search string. If none exist, it will be an empty object.

    • Readonlyusername: string

      Infrequently used username part of a url.

      BuildUrl('https://anonymous:my-pass@developer.mozilla.org').username ===
      'anonymous';