firefish/packages/client/src/scripts/safe-uri-decode.ts
2023-07-20 04:17:05 +09:00

7 lines
124 B
TypeScript

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