fix: Test- en linting-errors opgelost
This commit is contained in:
parent
ce5c0ea629
commit
ba912c3ef0
20 changed files with 103 additions and 116 deletions
|
@ -2,10 +2,10 @@
|
|||
* Convert a Base64-encoded string into a buffer with the same data.
|
||||
* @param base64 The Base64 encoded string.
|
||||
*/
|
||||
export function base64ToArrayBuffer(base64: string) {
|
||||
var binaryString = atob(base64);
|
||||
var bytes = new Uint8Array(binaryString.length);
|
||||
for (var i = 0; i < binaryString.length; i++) {
|
||||
export function base64ToArrayBuffer(base64: string): ArrayBuffer {
|
||||
const binaryString = atob(base64);
|
||||
const bytes = new Uint8Array(binaryString.length);
|
||||
for (let i = 0; i < binaryString.length; i++) {
|
||||
bytes[i] = binaryString.charCodeAt(i);
|
||||
}
|
||||
return bytes.buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue