(str: string)
| 33 | } |
| 34 | |
| 35 | export function decodeBASE64(str: string): string { |
| 36 | const binary = atob(str); |
| 37 | const bytes = new Uint8Array(binary.length); |
| 38 | for (let i = 0; i < binary.length; i++) { |
| 39 | bytes[i] = binary.charCodeAt(i); |
| 40 | } |
| 41 | return new TextDecoder().decode(bytes); |
| 42 | } |
| 43 | |
| 44 | export async function fetchFileBASE64(url: string): Promise<string> { |
| 45 | const response = await fetch(url); |
nothing calls this directly
no outgoing calls
no test coverage detected