Baseit
Base(x) In --> Base(x) Out
Install
npm install baseit
Basic Use
var baseit = ; ;
Slightly Less Basic Use
var baseit = ; ;
Parameters
input (Required)
Integer or string to be converted.
to (Optional)
Target encoding integer. If not specified, "to" will default to 10. Example for Base24: { to: 24 }.
from (Optional)
Input encoding integer. If not specified, "from" will default to 10. Example for Base8: { from: 8 }.
digits (Optional)
Minimum number of digits to return. Will append leading "zeros" to meet digit requirement. Example: { digits: 6 }
Why u no Base64!?
Node.js already has a good way of handling Base64 encoding.
Testing
vows test/*