astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
11 lines (10 loc) • 405 B
TypeScript
/**
* Creates a normalized URL from a request URL string.
* Decodes and validates the pathname, collapses duplicate slashes.
*/
export declare function createNormalizedUrl(requestUrl: string): URL;
/**
* Normalizes an already-parsed URL in place: decodes and validates the
* pathname, collapses duplicate slashes. Returns the same URL object.
*/
export declare function normalizeUrl(url: URL): URL;