mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
18 lines • 587 B
TypeScript
type NormalizeUrlParams = {
url: string;
removeHash?: boolean;
removeQueryString?: boolean;
};
/**
Utility function that normalizes a URL.
Removes http/s protocol, www, trailing backslashes.
Optionally removes query string and hash fragment.
*/
export declare function normalizeUrl({ url, removeHash, removeQueryString, }: NormalizeUrlParams): string;
/**
Adds protocol ("https://") to a URL if it is missing.
Intended for use in URL constructor.
*/
export declare function ensureProtocol(url: string): string;
export {};
//# sourceMappingURL=normalizeUrl.d.ts.map