New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-positive

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-positive - npm Package Compare versions

Comparing version 3.0.0 to 3.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-positive",
"version": "3.0.0",
"version": "3.1.0",
"description": "Check if something is a positive number",

@@ -16,3 +16,3 @@ "license": "MIT",

"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-positive [![Build Status](https://travis-ci.org/kevva/is-positive.svg?branch=master)](https://travis-ci.org/kevva/is-positive)

```js
var isPositive = require('is-positive');
const isPositive = require('is-positive');

@@ -30,7 +30,17 @@ isPositive(1);

//=> false
isPositive(Number(1))
//=> true
```
_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`](https://github.com/sindresorhus/positive-zero) module._
## Related
- [is-negative](https://github.com/kevva/is-negative) - Check if something is a negative number
## License
MIT © [Kevin Martensson](http://github.com/kevva)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc