base64int
v1.1.0
Published
Pure JS integer to/from base64 converter
Downloads
109
Readme
Base64 Int
Pure JS integer to/from base64 converter compatible with IE7+, Opera, Firefox, Chrome and Safari. Outputs a base64 string that can be stored in cookies, useful for compressing numbers.
How to install
npm install base64int
Example
var base64int = require('base64int');
base64int.encode(123456);
// returns "eJA"
base64int.decode('eJA');
// returns 123456