UNPKG

assistant-cloud

Version:

Cloud integration for assistant-ui

7 lines (6 loc) • 211 B
export const normalizeBaseUrl = (baseUrl: string): string => { if (!baseUrl) return baseUrl; let end = baseUrl.length; while (end > 0 && baseUrl[end - 1] === "/") end--; return baseUrl.slice(0, end); };