Bijective Function and Encoding

I needed to Base62 encode a URL for a project I was working on and I ended up reading and learning about the details of bijective functions in this Stack Overflow answer. The answer really outlined it nicely and I ended up porting another person's Ruby bijective encode function to JavaScript for use in my project..