šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

is-negative

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-negative

Check if something is a negative number

2.1.0
latest
Source
npm
Version published
Weekly downloads
14K
39.38%
Maintainers
1
Weekly downloads
Ā 
Created
Source

is-negative Build Status

Check if something is a negative number

Install

$ npm install --save is-negative

Usage

const isNegative = require('is-negative');

isNegative(-1);
//=> true

isNegative(1);
//=> false

isNegative(0);
//=> false

isNegative('-1');
//=> false

isNegative(Number(-1))
//=> true

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

  • is-positive - Check if something is a positive number

License

MIT Ā© Kevin Martensson

Keywords

negative

FAQs

Package last updated on 11 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts