Is it a number - Node.js Data Type

Node.js examples for Data Type:Type Check

Description

Is it a number

Demo Code


//ref: http://stackoverflow.com/questions/9716468/is-there-any-function-like-isnumeric-in-javascript-to-validate-numbers

Math.isNumber = function isNumber(vtn) { 
  return !isNaN(parseFloat(vtn)) && isFinite(vtn);
}

Related Tutorials