UNPKG

build-url-ts

Version:

A small library that builds a URL given its components

16 lines 868 B
export type IQueryParams = Record<string, null | undefined | string | number | string[] | (string | number)[]>; export type IDisableCsvType = 'array' | 'order_asc' | 'order_desc'; export declare function buildQueryString(queryParams: IQueryParams, lowerCase?: boolean, disableCSV?: boolean | IDisableCsvType): string; export declare function appendPath(path: string | number, builtUrl: string, lowerCase?: boolean): string; export declare function buildHash(hash: string | number, lowerCase?: boolean): string; interface IUrlOptions { path?: string | number; lowerCase?: boolean; queryParams?: IQueryParams; disableCSV?: boolean | IDisableCsvType; hash?: string | number; } declare function buildUrl(url?: string | null | IUrlOptions, options?: IUrlOptions): string; export { buildUrl }; export default buildUrl; //# sourceMappingURL=index.d.ts.map