Radix.js
Radix.js is a simple javascript module to convent number to 2~64 radix, decimal supported.
1. Install
npm install radix.js
Or download dist/radix.min.js
source file。
2. Import It
Script
tag.
ES6
style.
var Radix = ; //or ;
3. Usage & API
There is only one API named convent
.
var radix = ;radix; // will convent number 5301314 from radix 10 to radix 64.
Now the max radix is 64, and the formatter is: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@
. Also you can set your own formatter like below:
var radix = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';radix;
4. Test
npm install
npm test
5. LICENSE
MIT@hustcc