feat(btoa): port and modify from Array.of.js

Please review my code and give me some advice, thanks @tomchentw .
Please give it a trailing comma.