1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-29 23:38:51 +09:00
whippy-edition/app/javascript/mastodon/utils/base64.js

11 lines
247 B
JavaScript
Raw Normal View History

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;
};