@types/ale-url-parser
TypeScript icon, indicating that this package has built-in type declarations

0.13.3 • Public • Published

Installation

npm install --save @types/ale-url-parser

Summary

This package contains type definitions for ale-url-parser (https://github.com/msn0/ale-url-parser#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ale-url-parser.

index.d.ts

export interface QueryParams {
    [key: string]: any;
}

export interface UrlObject {
    /**
     * @default 'http'
     */
    protocol?: string | undefined;
    /**
     * @default '''
     */
    host?: string | undefined;
    /**
     * @default []
     */
    path?: string[] | undefined;
    /**
     * @default {}
     */
    query?: QueryParams | undefined;
    hash?: string | undefined;
}

export interface Options {
    /**
     * Sorting query params is disabled by default.
     * You can define your own sorting method
     */
    compareFunction?: ((a: string, b: string) => number) | undefined;
}

/**
 * Parse url string into url object.
 * @return UrlObject
 */
export function parse(url: string): UrlObject;

/**
 * Stringify url object into url string.
 * @return string
 */
export function stringify(urlObject: UrlObject, options?: Options): string;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Michał Jezierski, and Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ale-url-parser

Weekly Downloads

2

Version

0.13.3

License

MIT

Unpacked Size

4.56 kB

Total Files

5

Last publish

Collaborators

  • types