🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
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 - npm Package Compare versions

Comparing version

to
2.1.0

2

index.js
'use strict';
module.exports = function (n) {
return typeof n === 'number' && n < 0;
return toString.call(n) === '[object Number]' && n < 0;
};
{
"name": "is-negative",
"version": "2.0.2",
"description": "Check if something is a positive number",
"version": "2.1.0",
"description": "Check if something is a negative number",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": "kevva/is-negative",

"scripts": {
"test": "node test.js"
"test": "xo && ava"
},

@@ -29,4 +29,5 @@ "files": [

"devDependencies": {
"ava": "^0.0.4"
"ava": "*",
"xo": "*"
}
}

@@ -16,3 +16,3 @@ # is-negative [![Build Status](https://travis-ci.org/kevva/is-negative.svg?branch=master)](https://travis-ci.org/kevva/is-negative)

```js
var isNegative = require('is-negative');
const isNegative = require('is-negative');

@@ -30,2 +30,5 @@ isNegative(-1);

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

@@ -32,0 +35,0 @@