bhd

0.1.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i bhd

    Weekly Downloads

    7

    Version

    0.1.1

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • dmdgeeker