~cytrogen/masto-fe

ref: ec0c104bf25f2689c31bb79f9f447be1a9b3da7f masto-fe/app/javascript/mastodon/utils/base64.js -rw-r--r-- 247 bytes
ec0c104b — Nick Schonning Ensure tabIndex is number instead of string (#24409) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
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;
};