mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
17 lines
413 B
TypeScript
17 lines
413 B
TypeScript
import type { ThemeOptions } from '../../src/types/svg';
|
|
|
|
const fullUrl = 'https://svgl.app';
|
|
|
|
export const addFullUrl = (value: string | ThemeOptions): string | ThemeOptions => {
|
|
if (typeof value === 'string') {
|
|
return `${fullUrl}${value}`;
|
|
} else if (typeof value === 'object') {
|
|
return {
|
|
light: `${fullUrl}${value.light}`,
|
|
dark: `${fullUrl}${value.dark}`
|
|
};
|
|
}
|
|
return value;
|
|
};
|
|
|