baseconvert
This module is based on this Gist by faisalman.
Installation
Install via npm
npm install baseconvert --save
Require in your application
var baseConvert = require('baseconvert');
Usage
var baseConvert = ; var myDecimalNumber = baseConvert; console; // echoes 255
References
The following methods are available:
bin2hex
converts a binary into an hexadecimalhex2bin
converts an hexadecimal into a binarybin2dec
converts a binary into a decimaldec2bin
converts a decimal into a binaryhex2dec
converts an hexadecimal into a decimaldec2hex
converts a decimal into an hexadecimal
You can also play with any other needed bases:
var myNumber = baseConvert;