{"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"dist-tags":{"latest":"4.0.1"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"description":"Check if a value is a natural number","readme":"# is-natural-number.js\n\n[![NPM version](https://img.shields.io/npm/v/is-natural-number.svg)](https://www.npmjs.com/package/is-natural-number)\n[![Bower version](https://img.shields.io/bower/v/is-natural-number.svg)](https://github.com/shinnn/is-natural-number.js/releases)\n[![Build Status](https://travis-ci.org/shinnn/is-natural-number.js.svg)](https://travis-ci.org/shinnn/is-natural-number.js)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-natural-number.js.svg)](https://coveralls.io/r/shinnn/is-natural-number.js?branch=master)\n[![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)\n\nCheck if a value is a [natural number](https://wikipedia.org/wiki/Natural_number)\n\n## Installation\n\n### Package managers\n\n#### [npm](https://www.npmjs.com/)\n\n```\nnpm install is-natural-number\n```\n\n#### [Bower](http://bower.io/)\n\n```\nbower install is-natural-number\n```\n\n#### [Duo](http://duojs.org/)\n\n```javascript\nvar isNaturalNumber = require('shinnn/is-natural-number.js');\n```\n\n### Standalone\n\n[Download the script file directly.](https://raw.githubusercontent.com/shinnn/is-natural-number.js/master/is-natural-number.js)\n\n## API\n\n### isNaturalNumber(*number*, *option*)\n\n*number*: `Number`  \n*option*: `Object`  \nReturn: `Boolean`\n\nIt returns `true` if the first argument is one of the natural numbers. If not, or the argument is not a number, it returns `false`.\n\n```javascript\nisNaturalNumber(10); //=> true\n\nisNaturalNumber(-10); //=> false\nisNaturalNumber(10.5); //=> false\nisNaturalNumber(Infinity); //=> false\nisNaturalNumber('10'); //=> false\n```\n\n*Check [the test](./test.js) for more detailed specifications.*\n\n#### option.includeZero\n\nType: `Boolean`\nDefault: `false`\n\nBy default the number `0` is not regarded as a natural number.\n\nSetting this option `true` makes `0` regarded as a natural number.\n\n```javascript\nisNaturalNumber(0); //=> false\nisNaturalNumber(0, {includeZero: true}); //=> true\n```\n\n## License\n\nCopyright (c) 2014 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](./LICENSE).\n","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"users":{"royston":true},"bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"license":"MIT","versions":{"1.0.0":{"name":"is-natural-number","version":"1.0.0","description":"Check if a number is a natural number","repository":{"type":"git","url":"https://github.com/shinnn/is-natural-number.js"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint *.js & jscs *.js","test":"node test.js | tap-dot","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/is-natural-number.js/blob/master/LICENSE"}],"main":"is-natural-number-cjs.js","files":["is-natural-number-cjs.js","LICENSE"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"eslint":"^0.9.2","is-integer":"^1.0.3","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jscs":"^1.7.3","require-uncached":"^1.0.2","tap-dot":"^0.2.3","tape":"^3.0.3"},"jscsConfig":{"preset":"google","maximumLineLength":98},"gitHead":"f3c7501812ca2e3efe7743f5a4281f9cd692073e","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js","_id":"is-natural-number@1.0.0","_shasum":"d7af7ff76e3c599649ce323b52c20981bc2f53e8","_from":".","_npmVersion":"2.1.9","_nodeVersion":"0.10.33","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"d7af7ff76e3c599649ce323b52c20981bc2f53e8","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-1.0.0.tgz"},"directories":{}},"2.0.0":{"name":"is-natural-number","version":"2.0.0","description":"Check if a number is a natural number","repository":{"type":"git","url":"https://github.com/shinnn/is-natural-number.js"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"jscs *.js && eslint *.js","test":"node test.js | tap-dot","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/is-natural-number.js/blob/master/LICENSE"}],"main":"is-natural-number-cjs.js","files":["is-natural-number-cjs.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"eslint":"^0.14.1","istanbul":"^0.3.5","istanbul-coveralls":"^1.0.1","jscs":"^1.11.3","require-uncached":"^1.0.2","tap-dot":"^1.0.0","tape":"^3.5.0"},"jscsConfig":{"preset":"google","maximumLineLength":98,"requireBlocksOnNewline":true,"validateLineBreaks":"LF"},"gitHead":"1b43e3bdc52269d40194bb27ae14159b0a4fc0fb","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js","_id":"is-natural-number@2.0.0","_shasum":"f7e896fd0c80dc1a51d53c33995cb93608e7a6b2","_from":".","_npmVersion":"2.5.0","_nodeVersion":"1.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"f7e896fd0c80dc1a51d53c33995cb93608e7a6b2","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-2.0.0.tgz"},"directories":{}},"2.1.0":{"name":"is-natural-number","version":"2.1.0","description":"Check if a number is a natural number","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn is-natural-number-cjs.js --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-dot","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.1.0","eslint":"^2.9.0","istanbul":"^0.4.3","require-uncached":"^1.0.2","tap-dot":"^1.0.5","tape":"^4.5.1"},"gitHead":"48ee25f66afde44a660312fb82b3501cff49bcf0","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js#readme","_id":"is-natural-number@2.1.0","_shasum":"c4abc61824be67f64ff61ed74ace2418659913e3","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"c4abc61824be67f64ff61ed74ace2418659913e3","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-2.1.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/is-natural-number-2.1.0.tgz_1462517434157_0.9034317054320127"},"directories":{}},"2.1.1":{"name":"is-natural-number","version":"2.1.1","description":"Check if a value is a natural number","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn is-natural-number-cjs.js --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-dot","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.1.0","eslint":"^2.9.0","istanbul":"^0.4.3","require-uncached":"^1.0.2","tap-dot":"^1.0.5","tape":"^4.5.1"},"gitHead":"49dc437da15aacc8b6c6d0fc643f29ec40a2902f","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js#readme","_id":"is-natural-number@2.1.1","_shasum":"7d4c5728377ef386c3e194a9911bf57c6dc335e7","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"7d4c5728377ef386c3e194a9911bf57c6dc335e7","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-2.1.1.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-natural-number-2.1.1.tgz_1462519569263_0.1381252424325794"},"directories":{}},"3.0.0":{"name":"is-natural-number","version":"3.0.0","description":"Check if a value is a natural number","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-dot","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.1.0","eslint":"^2.9.0","istanbul":"^0.4.3","require-from-string":"^1.2.0","rollup":"^0.26.3","tap-dot":"^1.0.5","tape":"^4.5.1"},"gitHead":"64b363f615fd4652d37d1ef8928443c075b609e0","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js#readme","_id":"is-natural-number@3.0.0","_shasum":"4dcb7391a98c1519c4e03b8abb96ef2a75b5553f","_from":".","_npmVersion":"3.9.0","_nodeVersion":"6.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"4dcb7391a98c1519c4e03b8abb96ef2a75b5553f","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-3.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-natural-number-3.0.0.tgz_1463396720886_0.007591127417981625"},"directories":{}},"4.0.0":{"name":"is-natural-number","version":"4.0.0","description":"Check if a value is a natural number","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-dot","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.1.0","eslint":"^2.9.0","istanbul":"^0.4.3","require-from-string":"^1.2.0","rollup":"^0.26.3","tap-dot":"^1.0.5","tape":"^4.5.1"},"gitHead":"45a0dd352482b050a5afabb774a9f493e7332260","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js#readme","_id":"is-natural-number@4.0.0","_shasum":"f2a4cd3be825a0f225a45a8a48cc0740e3c1fdee","_from":".","_npmVersion":"3.9.0","_nodeVersion":"6.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"f2a4cd3be825a0f225a45a8a48cc0740e3c1fdee","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-4.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/is-natural-number-4.0.0.tgz_1463398304771_0.27103321230970323"},"directories":{}},"4.0.1":{"name":"is-natural-number","version":"4.0.1","description":"Check if a value is a natural number","repository":{"type":"git","url":"git+https://github.com/shinnn/is-natural-number.js.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-dot","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["number","natural","check","int","integer","math","mathematics","range","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.1.0","eslint":"^2.9.0","istanbul":"^0.4.3","require-from-string":"^1.2.0","rollup":"^0.26.3","tap-dot":"^1.0.5","tape":"^4.5.1"},"gitHead":"a19fa22c16d1f2b9fafafbcf887efc3cbcd1ae81","bugs":{"url":"https://github.com/shinnn/is-natural-number.js/issues"},"homepage":"https://github.com/shinnn/is-natural-number.js#readme","_id":"is-natural-number@4.0.1","_shasum":"ab9d76e1db4ced51e35de0c72ebecf09f734cde8","_from":".","_npmVersion":"3.9.0","_nodeVersion":"5.9.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"ab9d76e1db4ced51e35de0c72ebecf09f734cde8","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-natural-number/-/is-natural-number-4.0.1.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/is-natural-number-4.0.1.tgz_1463398964620_0.07150219171307981"},"directories":{}}},"name":"is-natural-number","time":{"modified":"2017-03-23T08:28:45.227Z","created":"2014-11-23T10:05:41.872Z","1.0.0":"2014-11-23T10:05:41.872Z","2.0.0":"2015-02-15T05:16:07.236Z","2.1.0":"2016-05-06T06:50:37.071Z","2.1.1":"2016-05-06T07:26:09.739Z","3.0.0":"2016-05-16T11:05:21.476Z","4.0.0":"2016-05-16T11:31:48.014Z","4.0.1":"2016-05-16T11:42:48.135Z"},"readmeFilename":"README.md","homepage":"https://github.com/shinnn/is-natural-number.js#readme"}