(base64Str: string)
| 1 | export const decodeBase64ToUnicode = (base64Str: string): string => { |
| 2 | // Decode base64 to a string using atob and convert it to a unicode string. |
| 3 | return decodeURIComponent( |
| 4 | atob(base64Str) |
| 5 | .split('') |
| 6 | ?.map((char) => `%${char.charCodeAt(0).toString(16).padStart(2, '0')}`) |
| 7 | .join('') |
| 8 | ) |
| 9 | } |
| 10 | |
| 11 | interface DownloadOptions { |
| 12 | body: string |
no test coverage detected