Node.js examples for Number:Int
Returns true if str contains a positive integer.
function is_positive_int(str) { var n = ~~Number(str); return String(n) === str && n > 0; }