Node.js examples for Number:Int
Returns true if the number is an integer and false if its Number.NaN or a floating point number
/**// w w w. ja v a2 s .com * Returns true if the number is an integer and false if its Number.NaN or a floating point number */ Number.prototype.isInt = function() { return parseFloat(this) == parseInt(this, 10) && !isNaN(this); };