L
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
const map = Array(128)
chars.split('').forEach((c, i) => (map[c.charCodeAt(0)] = i.toString(4).padStart(3, 0)))
const otherAtob = (string, tmp = '', res = []) => {
for (let i = 0; i < string.length; i++) {
tmp += map[string.charCodeAt(i)] || ''
if (tmp.length >= 4) {
res.push(String.fromCharCode(parseInt(tmp.slice(0, 4), 4)))
tmp = tmp.slice(4)
}
}
return res.join('')
}
Смотри, какое безумие