UNPKG

@the-teacher/the-router

Version:

Simple router for Express.js, making routes and actions easy to manage.

17 lines 878 B
/** * Encodes a path parameter, ensuring all special characters are properly encoded. */ export declare function encodePathParam(value: string): string; /** * Replaces placeholders in the path template with actual values. */ export declare function replacePathParams(pathTemplate: string, pathParams: Record<string, string>): string; /** * Builds query string from the given URL parameters. */ export declare function buildQueryString(urlParams?: Record<string, string | number | boolean | undefined | null>, methodParam?: string): string; /** * Main function: builds a complete URL with path and query parameters. */ export declare function buildUrlWithParams(pathTemplate: string, pathParams?: Record<string, string>, urlParams?: Record<string, string | number | boolean | undefined | null>, methodParam?: string): string; //# sourceMappingURL=buildUrlHelpers.d.ts.map