2.1.0 • Published 10 years ago
is-negative v2.1.0
is-negative 
Check if something is a negative number
Install
$ npm install --save is-negativeUsage
const isNegative = require('is-negative');
isNegative(-1);
//=> true
isNegative(1);
//=> false
isNegative(0);
//=> false
isNegative('-1');
//=> false
isNegative(Number(-1))
//=> trueNote: This module doesn't consider -0 to be a negative number. If you want to detect -0, use the negative-zero module.
Related
- is-positive - Check if something is a positive number
License
MIT © Kevin Martensson