rwz/base64.coffee — pull request #1 by jacobwg (2012-04-14 20:44:12+00:00)
Title: Make Unicode Optional and Make Exception a Real Exception

I'm trying to rewrite part of [jacobwg/shortly](https://github.com/jacobwg/shortly) using this class, and had to make a few changes.

Firstly, I've made unicode support optional as shortly needs to do Unicode pack/unpack at a different stage and doing it during base64 encode was breaking the app. Thus, I added a second parameter to enable unicode support if it is needed.

Secondly, I made the InvalidCharacter error its own exception class.