Skip to content

nuintun/URI

Repository files navigation

URI

A simple WHATWG URI parser.

NPM Version Download Status Languages Status Tree Shakeable Side Effect License

/**
 * @module URI
 * @license MIT
 */

export interface ParseResult {
  [key: string]: string | null | (string | null)[];
}

/**
 * @class URI
 */
export declare class URI {
  protocol: string | null;
  username: string | null;
  password: string | null;
  hostname: string | null;
  port: string | null;
  pathname: string | null;
  query: ParseResult;
  fragment: ParseResult;
  /**
   * @constructor
   * @param URI
   */
  constructor(URI: string);
  /**
   * @property search
   * @method get
   */
  get search(): string;
  /**
   * @property hash
   * @method get
   */
  get hash(): string;
  /**
   * @method toURI
   */
  toURI(): string;
  /**
   * @method toString
   */
  toString(): string;
}

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •