akaba-url-parse
v1.2.2
Published
```typescript export declare class AkabaUrlSearchParse { readonly urlPairMap: Map<string, string | boolean>; constructor(urlSearch?: string); addPair(name: string, value: string): this; removePair(name: string): this; getPairValu
Downloads
4
Readme
akaba-tool
类 AkabaUrlSearchParse
export declare class AkabaUrlSearchParse {
readonly urlPairMap: Map<string, string | boolean>;
constructor(urlSearch?: string);
addPair(name: string, value: string): this;
removePair(name: string): this;
getPairValueByName(name: string): string | boolean | undefined;
getString(withMark?: boolean): string;
getCopyInstance(): AkabaUrlSearchParse;
}
类 AkabaUrlParse
export declare namespace NSAkabaUrlParse {
interface IMatchResultDict {
protocol: string | null;
domain: string | null;
port: string | null;
path: string | null;
search: string | null;
hash: string | null;
}
type TMatchResult = (RegExpMatchArray & {
groups: NSAkabaUrlParse.IMatchResultDict;
}) | null;
}
export declare class AkabaUrlParse {
protocol: string;
domain: string;
port: string;
path: string;
readonly searchObj: UrlSearchParse;
hash: string;
fixedSearch: boolean;
constructor(url?: string | NSAkabaUrlParse.IMatchResultDict, fixedSearch?: boolean);
addSearchPair(name: string, value: string): AkabaUrlParse;
removeSearchPair(name: string): AkabaUrlParse;
getSearch(withMark?: boolean): string;
getString(): string;
getCopyInstance(): AkabaUrlParse;
goTo(): void;
getPath(): string;
getUrlObj(): NSAkabaUrlParse.IMatchResultDict;
getNewParseFromUpdate(updateObj?: Partial<NSAkabaUrlParse.IMatchResultDict>, fixedSearch?: boolean): AkabaUrlParse;
static getMatchResult(url: string): NSAkabaUrlParse.TMatchResult;
static buildStringFromObj(urlObj: NSAkabaUrlParse.IMatchResultDict): string;
static attrList: readonly ["protocol", "domain", "port", "path", "search", "hash"];
}