akaba-url-parse
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

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"];
}

Readme

Keywords

none

Package Sidebar

Install

npm i akaba-url-parse

Weekly Downloads

1

Version

1.2.2

License

ISC

Unpacked Size

63.9 kB

Total Files

21

Last publish

Collaborators

  • chiyu_xinyi