more low-hanging fruits

This commit is contained in:
Henry Jameson 2026-08-04 17:12:46 +03:00
commit b2dca4a3f6
20 changed files with 45 additions and 45 deletions

View file

@ -1,7 +1,7 @@
/* global process */
function urlBase64ToUint8Array(base64String) {
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/')
const base64 = (base64String + padding).replaceAll('-', '+').replace(/_/g, '/')
const rawData = window.atob(base64)
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))