Resolves a relative URL, returning a fully qualified URL.
Parameters
baseAddress: string
The base URL being resolved against.
relativeUrl: string
The URL being resolved.
Optional normalize: boolean
Optional. If set to true, will simplify the URL before returning.
Returns string
Static simplify
simplify(url: string): string
Simplifies a URL by processing double dots (..) and single dots (.) in the URL.
For example, /sites/MySite/viewers/ViewerA/VirtualDirectory/../../ is simplified to /sites/MySite/viewers/.
Parameters
url: string
The URL to simplify.
Returns string
Static stripProtocol
stripProtocol(url: string): string
Strips the protocol from a url, useful for comparing urls when we want to ignore http/https
Static utility methods for working with URLs.