mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
7 lines
236 B
TypeScript
7 lines
236 B
TypeScript
export const withBase = (path: string, baseUrl: string) => {
|
|
const normalizedBase = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;
|
|
const normalizedPath = path.replace(/^\//, '');
|
|
|
|
return `${normalizedBase}${normalizedPath}`;
|
|
};
|