How might atob() be implemented in JS?