Nodejs Utililty Methods Hex to Number

List of utility methods to do Hex to Number

Description

The list of methods to do Hex to Number are organized into topic(s).

Method

hexNumber()
String.prototype.hexNumber = function() {
  return /^(0x)?[0-9a-f]*$/i.test(this);
};
hexToNumber()
String.prototype.hexToNumber = function(){
  return Number(parseInt( this, 16 ));
};
Number.prototype.toBinaryString = function( length ){
  var s = Number(this).toString( 2 );
  while( length && s.length < length ){
    s = '0' + s;
  return s;
...