glitchier-soc/app/javascript/flavours/glitch/util/base64.js
2018-08-23 22:58:25 +02:00

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