0.13.3 • Published 6 months ago
@types/ale-url-parser v0.13.3
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
// Type definitions for ale-url-parser 0.13
// Project: https://github.com/msn0/ale-url-parser#readme
// Definitions by: Michał Jezierski <https://github.com/msn0>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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: Wed, 07 Jul 2021 21:44:04 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Michał Jezierski, and Piotr Błażejewicz.