mirror of
https://github.com/funamitech/mastodon
synced 2024-12-15 15:18:30 +09:00
11 lines
247 B
JavaScript
11 lines
247 B
JavaScript
|
export const decode = base64 => {
|
||
|
const rawData = window.atob(base64);
|
||
|
const outputArray = new Uint8Array(rawData.length);
|
||
|
|
||
|
for (let i = 0; i < rawData.length; ++i) {
|
||
|
outputArray[i] = rawData.charCodeAt(i);
|
||
|
}
|
||
|
|
||
|
return outputArray;
|
||
|
};
|