The number to check.
A boolean indicating whether the input is a positive integer.
This function uses the Number.isInteger
method and a simple greater than or equal to zero.
isPositiveInteger(5); ;
//=> true
isPositiveInteger(-5);;
//=> false
isPositiveInteger(0); ;
//=> true
isPositiveInteger(5.5);;
//=> false
Generated using TypeDoc
Checks if a given number is a positive integer.