(blob: Blob)
| 369 | }; |
| 370 | |
| 371 | export function blobToBase64(blob: Blob): Promise<string> { |
| 372 | return new Promise((resolve) => { |
| 373 | const reader = new FileReader(); |
| 374 | reader.onloadend = function () { |
| 375 | resolve(<string>this.result); |
| 376 | }; |
| 377 | reader.readAsDataURL(blob); |
| 378 | }); |
| 379 | } |
| 380 | |
| 381 | /* |
| 382 | export function blobToText(blob: Blob): Promise<string | null> { |
no outgoing calls
no test coverage detected