3 Star 0 Fork 0

Gitee 极速下载 / radix.js

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hustcc/radix.js.git
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

Radix.js

Radix.js is a simple javascript module to convent number to 2-64 radix, decimal supported. 一个用于数字进制转换的 JavaScript 模块,默认支持 2-64 进制(可自定义),支持小数的进制转化

Build Status Coverage Status npm npm npm

1. Install

npm install radix.js

Or download dist/radix.min.js source file.

2. Import It

  • Script tag.
<script type="text/javascript" src="dist/radix.min.js"></script>
  • ES6 style.
var Radix = require('radix.js');

//or

import Radix from 'radix.js';

3. Usage & API

There is only one API named convent.

var radix = new Radix();
radix.convent(5201314, 10, 64); // 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 = new Radix('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#');
radix.convent('jRSy', 64);

4. Test

npm install

npm test

5. LICENSE

MIT@hustcc

Empty file

About

No description expand collapse
JavaScript and 2 more languages
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/mirrors/radix.js.git
git@gitee.com:mirrors/radix.js.git
mirrors
radix.js
radix.js
master

Search