Project radix.js is a simple javascript module to convent number to 2~64 radix, decimal supported.
项目 radix.js 是一个 JavaScript 开发用于数字进制转换的库,支持 2~64 进制(或者自定义),支持小数的进制转化。
转化进制(radix) | 进制数(radix value) |
npm install radix.js
Then import it.
// import library use script tag. <script type="text/javascript" src="dist/radix.min.js"></script> // or ES6 style. const Radix = require('radix.js'); // or import Radix from 'radix.js';
var radix = new Radix(); radix.convent(5201314, 10, 64); // will convent number 5301314 from radix 10 to radix 64.
The code of radix.js hosted on Github, click here. Welcome to issue or pull request.