Check if something is a positive number

Install

$ npm install --save is-positive

Usage

const isPositive = require ( ' is-positive ' ) ; isPositive ( 1 ) ; isPositive ( 0 ) ; isPositive ( - 1 ) ; isPositive ( ' 1 ' ) ; isPositive ( Number ( 1 ) )

Note: This module doesn't consider 0 to be a positive number and doesn't distinguish between -0 and 0 . If you want to detect 0 , use the positive-zero module.

Related

is-negative - Check if something is a negative number

License

MIT © Kevin Martensson