push
github
1320 of 1468 branches covered (89.92%)
Branch coverage included in aggregate %.
104 of 2237 new or added lines in 31 files covered. (4.65%)
5289 of 8941 relevant lines covered (59.15%)
31.8 hits per line
NEW
|
export const blob2base64Async = (blob: Blob) => { |
× |
NEW
|
return new Promise((resolve, reject) => { |
× |
NEW
|
const fr = new FileReader(); |
× |
NEW
|
fr.onload = (e) => { |
× |
NEW
|
resolve(e.target?.result); |
× |
NEW
|
}; |
× |
|
/* c8 ignore next 3 */
|
2✔ |
|
fr.onerror = () => { |
2✔ |
|
reject(new Error('blob2base64Async: can not convert')); |
2✔ |
|
}; |
2✔ |
NEW
|
fr.readAsDataURL(blob); |
× |
NEW
|
}); |
× |
NEW
|
}; |
× |