mirror of
https://github.com/funamitech/mastodon
synced 2024-12-15 15:18:30 +09:00
e8243d5bbd
Port e38b391940
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
11 lines
269 B
TypeScript
11 lines
269 B
TypeScript
export const decode = (base64: string): Uint8Array => {
|
|
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;
|
|
};
|