https://github.com/131/base-convertor
https://github.com/131/base-convertor
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/131/base-convertor
- Owner: 131
- Created: 2016-02-26T14:52:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T15:00:46.000Z (over 10 years ago)
- Last Synced: 2025-08-09T02:24:03.461Z (10 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Base conversion
Convert data from any base to any base
# API/usage
```
var convert = require('base-convertor');
//convert(data_string, input_chars, output_chars)
//display 17 (base 10)
console.log(convert('10001', '01', '0123456789').toString());
//display 10001 (binary format)
console.log(convert('17', '0123456789', '01').toString());
```
# Credits
* [131](mailto:131.js@cloudyks.org)
# Keywords / shout box
base, conversion, bin2hex, hex2bin, bin2dec, hex2dec, dec2bin, dex2hex, dec2dec