/** * Removes any leading slash from a URL. * * @param url The URL to format. * @group Utilities */ declare const removeLeadingSlash: (url: string) => string; /** * Removes any trailing slash from a URL. * * @param url The URL to format. * @group Utilities */ declare const removeTrailingSlash: (url: string) => string; /** * Remove any leading and trailing slash from a URL. * * @param url The URL to format. * @param leading Whether or not to remove any leading slash. * @param trailing Whether or not to remove the trailing slash. * @group Utilities */ declare const removeSlashes: (url: string, leading?: boolean, trailing?: boolean) => string; /** * Given a server route definition, this function creates a regular expression to match * it: The expression replaces the routes parameters with placeholders so it can be * compared with real routes. * * @param route The route from which the expression will be created. * @param leadingSlash Whether or not the expression should match a leading slash. * @param trailingSlash Whether or not the expression should match a trailing slash. * The reason this is `false` by default is because these * expressions are often used to match against incoming requests, * and they don't have a trailing slash. * @group Utilities */ declare const createRouteExpression: (route: string, leadingSlash?: boolean, trailingSlash?: boolean) => RegExp; export { createRouteExpression, removeLeadingSlash, removeSlashes, removeTrailingSlash };