UrlCodec
A codec for encoding and decoding URL parts.
abstract class UrlCodec {
abstract encodePath(path: string): string
abstract decodePath(path: string): string
abstract encodeSearch(search: string | { [k: string]: unknown; }): string
abstract decodeSearch(search: string): {...}
abstract encodeHash(hash: string): string
abstract decodeHash(hash: string): string
abstract normalize(href: string): string
abstract normalize(path: string, search: { [k: string]: unknown; }, hash: string, baseUrl?: string): string
abstract areEqual(valA: string, valB: string): boolean
abstract parse(url: string, base?: string): {...}
}
Subclasses
Methods
encodePath() |
---|
Encodes the path from the provided string |
decodePath() |
---|
Decodes the path from the provided string |
encodeSearch() |
---|
Encodes the search string from the provided string or object |
decodeSearch() |
---|
Decodes the search objects from the provided string |
encodeHash() |
---|
Encodes the hash from the provided string |
decodeHash() |
---|
Decodes the hash from the provided string |
areEqual() |
---|
Checks whether the two strings are equal |
parse() | ||||||
---|---|---|---|---|---|---|
Parses the URL string based on the base URL |
||||||
Parameters
Returns
|