1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-16 07:38:07 +09:00
hotomoe/packages/frontend/src/scripts/safe-uri-decode.ts
2022-12-27 14:36:33 +09:00

8 lines
124 B
TypeScript

export function safeURIDecode(str: string): string {
try {
return decodeURIComponent(str);
} catch {
return str;
}
}