UrlCodec
用于编码和解码 URL 部分的编解码器。
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 areEqual(valA: string, valB: string): boolean
abstract parse(url: string, base?: string): {...}
}
方法
解码所提供的字符串的路径 Encodes the path from the provided string |
解码所提供的字符串的路径 Decodes the path from the provided string |
从所提供的字符串或对象中编码搜索字符串 Encodes the search string from the provided string or object |
从所提供的字符串中解码搜索对象 Decodes the search objects from the provided string |
对所提供的字符串中的哈希进行编码 Encodes the hash from the provided string |
从所提供的字符串中解码哈希 Decodes the hash from the provided string |
检查两个字符串是否相等 Checks whether the two strings are equal |
根据基本 URL 解析 URL 字符串 Parses the URL string based on the base URL | ||||||
参数
返回值
|