Socket
Socket
Sign inDemoInstall

is-natural-number

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

4

is-natural-number-cjs.js

@@ -16,6 +16,4 @@ /*!

return function isNaturalNumber(val, zero) {
return val >= (zero ? 0 : 1) &&
val < 9007199254740992 &&
Math.floor(val) === val;
return val >= (zero ? 0 : 1) && val !== Infinity && Math.floor(val) === val;
};
})();
{
"name": "is-natural-number",
"version": "1.0.0",
"version": "2.0.0",
"description": "Check if a number is a natural number",

@@ -11,3 +11,3 @@ "repository": "shinnn/is-natural-number.js",

"scripts": {
"pretest": "eslint *.js & jscs *.js",
"pretest": "jscs *.js && eslint *.js",
"test": "node test.js | tap-dot",

@@ -25,4 +25,3 @@ "coverage": "istanbul cover test.js",

"files": [
"is-natural-number-cjs.js",
"LICENSE"
"is-natural-number-cjs.js"
],

@@ -42,15 +41,16 @@ "keywords": [

"devDependencies": {
"eslint": "^0.9.2",
"is-integer": "^1.0.3",
"istanbul": "^0.3.2",
"eslint": "^0.14.1",
"istanbul": "^0.3.5",
"istanbul-coveralls": "^1.0.1",
"jscs": "^1.7.3",
"jscs": "^1.11.3",
"require-uncached": "^1.0.2",
"tap-dot": "^0.2.3",
"tape": "^3.0.3"
"tap-dot": "^1.0.0",
"tape": "^3.5.0"
},
"jscsConfig": {
"preset": "google",
"maximumLineLength": 98
"maximumLineLength": 98,
"requireBlocksOnNewline": true,
"validateLineBreaks": "LF"
}
}
# is-natural-number.js
[![NPM version](https://badge.fury.io/js/is-natural-number.svg)](https://www.npmjs.org/package/is-natural-number)
[![Bower version](https://badge.fury.io/bo/is-natural-number.svg)](https://github.com/shinnn/is-natural-number.js/releases)
[![Build Status](https://travis-ci.org/shinnn/is-natural-number.js.svg?branch=master)](https://travis-ci.org/shinnn/is-natural-number.js)
[![NPM version](https://img.shields.io/npm/v/is-natural-number.svg)](https://www.npmjs.com/package/is-natural-number)
[![Bower version](https://img.shields.io/bower/v/is-natural-number.svg)](https://github.com/shinnn/is-natural-number.js/releases)
[![Build Status](https://travis-ci.org/shinnn/is-natural-number.js.svg)](https://travis-ci.org/shinnn/is-natural-number.js)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-natural-number.js.svg)](https://coveralls.io/r/shinnn/is-natural-number.js?branch=master)

@@ -15,3 +15,3 @@ [![devDependency Status](https://david-dm.org/shinnn/is-natural-number.js/dev-status.svg)](https://david-dm.org/shinnn/is-natural-number.js#info=devDependencies)

#### [npm](https://www.npmjs.org/)
#### [npm](https://www.npmjs.com/)

@@ -74,4 +74,4 @@ ```

Copyright (c) 2014 [Shinnosuke Watanabe](https://github.com/shinnn)
Copyright (c) 2014 - 2015 [Shinnosuke Watanabe](https://github.com/shinnn)
Licensed under [the MIT License](./LICENSE).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc