bhd
v0.1.1
Published
BHD Converter
Downloads
15
Maintainers
Readme
bhd
BHD converter
Use this, convert numbers from one mode to another.
Install
First, you should install node.js and npm
After that, use npm command: $ npm install bhd
.
Install globally : $ npm install bhd -g
When use as a library
Example:
// new BHD(from, to);
var BHD = require('bhd');
var bhd = new BHD(10, 2); // convert from decimal to binary.
console.log(bhd.convert(123));
or
// bhd.convert(number, from, to);
var BHD = require('bhd');
var bhd = new BHD();
console.log(bhd.convert(123, 10, 2));
When use at terminal
Example:
$ bhd 10#1024#2 // convert 1024 from decimal to binary.
Test
test use mocha and should.js
$ npm install
$ npm test