{"_id":"validate.io-nonnegative-integer","_rev":"4087150","name":"validate.io-nonnegative-integer","description":"Validates if a value is a nonnegative integer.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"time":{"modified":"2025-12-02T22:11:46.000Z","created":"2015-02-23T00:04:51.228Z","1.0.0":"2015-02-23T00:05:10.468Z","0.0.0":"2015-02-23T00:04:51.228Z"},"users":{},"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"repository":{"type":"git","url":"git://github.com/validate-io/nonnegative-integer.git"},"versions":{"1.0.0":{"name":"validate.io-nonnegative-integer","version":"1.0.0","description":"Validates if a value is a nonnegative integer.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/nonnegative-integer.git"},"keywords":["validate.io","validate","validation","validator","valid","integer","nonnegative","is","isinteger"],"bugs":{"url":"https://github.com/validate-io/nonnegative-integer/issues"},"dependencies":{"validate.io-integer":"^1.0.5"},"devDependencies":{"chai":"1.x.x","mocha":"1.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"gitHead":"719b89115afdb4c0146c7fd9b3fc4e0dc1e88dd5","homepage":"https://github.com/validate-io/nonnegative-integer","_id":"validate.io-nonnegative-integer@1.0.0","_shasum":"8069243a08c5f98e95413c929dfd7b18f3f6f29f","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"dist":{"shasum":"8069243a08c5f98e95413c929dfd7b18f3f6f29f","size":2524,"noattachment":false,"key":"/validate.io-nonnegative-integer/-/validate.io-nonnegative-integer-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-nonnegative-integer/download/validate.io-nonnegative-integer-1.0.0.tgz"},"directories":{},"publish_time":1424649910468,"_hasShrinkwrap":false,"_cnpm_publish_time":1424649910468,"_cnpmcore_publish_time":"2021-12-17T01:24:49.638Z"},"0.0.0":{"name":"validate.io-nonnegative-integer","version":"0.0.0","description":"Validates if a value is a nonnegative integer.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/validate-io/nonnegative-integer.git"},"keywords":["validate.io","validate","validation","validator","valid","integer","nonnegative","is","isinteger"],"bugs":{"url":"https://github.com/validate-io/nonnegative-integer/issues"},"dependencies":{"validate.io-integer":"^1.0.5"},"devDependencies":{"chai":"1.x.x","mocha":"1.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/MIT"}],"gitHead":"624cae3c742b3b40d6611af8f9235a59e048896c","homepage":"https://github.com/validate-io/nonnegative-integer","_id":"validate.io-nonnegative-integer@0.0.0","_shasum":"cb09b2fc50917b573432f545e4558b3790b03206","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"npm:kgryte","email":""}],"dist":{"shasum":"cb09b2fc50917b573432f545e4558b3790b03206","size":2523,"noattachment":false,"key":"/validate.io-nonnegative-integer/-/validate.io-nonnegative-integer-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-nonnegative-integer/download/validate.io-nonnegative-integer-0.0.0.tgz"},"directories":{},"publish_time":1424649891228,"_hasShrinkwrap":false,"_cnpm_publish_time":1424649891228,"_cnpmcore_publish_time":"2021-12-17T01:24:49.851Z"}},"readme":"Nonnegative Integer\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> Validates if a value is a nonnegative integer.\n\n\n## Installation\n\n``` bash\n$ npm install validate.io-nonnegative-integer\n```\n\nFor use in the browser, use [browserify](https://github.com/substack/node-browserify).\n\n\n## Usage\n\n``` javascript\nvar isValid = require( 'validate.io-nonnegative-integer' );\n```\n\n#### isValid( value )\n\nValidates if a `value` is a nonnegative integer.\n\n``` javascript\nvar value = 5;\n\nvar bool = isValid( value );\n// returns true\n```\n\n\n## Examples\n\n``` javascript\nvar isValid = require( 'validate.io-nonnegative-integer' );\n\nconsole.log( isValid( 5 ) );\n// returns true\n\nconsole.log( isValid( 0 ) );\n// returns true\n\nconsole.log( isValid( Math.PI ) );\n// returns false\n\nconsole.log( isValid( -5 ) );\n// returns false\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n## Tests\n\n### Unit\n\nUnit tests use the [Mocha](http://mochajs.org) test framework with [Chai](http://chaijs.com) assertions. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul](https://github.com/gotwarlost/istanbul) as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT). \n\n\n## Copyright\n\nCopyright &copy; 2015. Athan Reines.\n\n\n[npm-image]: http://img.shields.io/npm/v/validate.io-nonnegative-integer.svg\n[npm-url]: https://npmjs.org/package/validate.io-nonnegative-integer\n\n[travis-image]: http://img.shields.io/travis/validate-io/nonnegative-integer/master.svg\n[travis-url]: https://travis-ci.org/validate-io/nonnegative-integer\n\n[coveralls-image]: https://img.shields.io/coveralls/validate-io/nonnegative-integer/master.svg\n[coveralls-url]: https://coveralls.io/r/validate-io/nonnegative-integer?branch=master\n\n[dependencies-image]: http://img.shields.io/david/validate-io/nonnegative-integer.svg\n[dependencies-url]: https://david-dm.org/validate-io/nonnegative-integer\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/nonnegative-integer.svg\n[dev-dependencies-url]: https://david-dm.org/dev/validate-io/nonnegative-integer\n\n[github-issues-image]: http://img.shields.io/github/issues/validate-io/nonnegative-integer.svg\n[github-issues-url]: https://github.com/validate-io/nonnegative-integer/issues\n","_attachments":{},"homepage":"https://github.com/validate-io/nonnegative-integer","bugs":{"url":"https://github.com/validate-io/nonnegative-integer/issues"}}