{"_id":"validate.io-integer-primitive","_rev":"4087278","name":"validate.io-integer-primitive","description":"Validates if a value is a number primitive and an integer.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2025-12-02T22:11:53.000Z","created":"2015-05-11T00:35:49.860Z","1.0.0":"2015-05-11T00:36:10.078Z","0.0.0":"2015-05-11T00:35:49.860Z"},"users":{},"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"repository":{"type":"git","url":"git://github.com/validate-io/integer-primitive.git"},"versions":{"1.0.0":{"name":"validate.io-integer-primitive","version":"1.0.0","description":"Validates if a value is a number primitive and an 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/integer-primitive.git"},"keywords":["validate.io","validate","validation","validator","valid","number","integer","is","isnumber","isinteger","primitive"],"bugs":{"url":"https://github.com/validate-io/integer-primitive/issues"},"dependencies":{"validate.io-number-primitive":"^1.0.0"},"devDependencies":{"chai":"2.x.x","mocha":"2.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":"7d5d76a8b474d679ba7a16d9d127295b218ffa54","homepage":"https://github.com/validate-io/integer-primitive#readme","_id":"validate.io-integer-primitive@1.0.0","_shasum":"a9aa010355fe8681c0fea6c1a74ad2419cadddc6","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.29","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"a9aa010355fe8681c0fea6c1a74ad2419cadddc6","size":2470,"noattachment":false,"key":"/validate.io-integer-primitive/-/validate.io-integer-primitive-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-integer-primitive/download/validate.io-integer-primitive-1.0.0.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"directories":{},"publish_time":1431304570078,"_hasShrinkwrap":false,"_cnpm_publish_time":1431304570078,"_cnpmcore_publish_time":"2021-12-17T02:00:21.337Z"},"0.0.0":{"name":"validate.io-integer-primitive","version":"0.0.0","description":"Validates if a value is a number primitive and an 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/integer-primitive.git"},"keywords":["validate.io","validate","validation","validator","valid","number","integer","is","isnumber","isinteger","primitive"],"bugs":{"url":"https://github.com/validate-io/integer-primitive/issues"},"dependencies":{"validate.io-number-primitive":"^1.0.0"},"devDependencies":{"chai":"2.x.x","mocha":"2.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":"cc62b8996493ae23a17fabe26ea149e6de90d34d","homepage":"https://github.com/validate-io/integer-primitive#readme","_id":"validate.io-integer-primitive@0.0.0","_shasum":"301754909a1c36c9a00360b187a23f2a63e72cad","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.29","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"301754909a1c36c9a00360b187a23f2a63e72cad","size":2472,"noattachment":false,"key":"/validate.io-integer-primitive/-/validate.io-integer-primitive-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/validate.io-integer-primitive/download/validate.io-integer-primitive-0.0.0.tgz"},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"directories":{},"publish_time":1431304549860,"_hasShrinkwrap":false,"_cnpm_publish_time":1431304549860,"_cnpmcore_publish_time":"2021-12-17T02:00:21.546Z"}},"readme":"Integer Primitive\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 number primitive and an integer.\n\n\n## Installation\n\n``` bash\n$ npm install validate.io-integer-primitive\n```\n\nFor use in the browser, use [browserify](https://github.com/substack/node-browserify).\n\n\n## Usage\n\n``` javascript\nvar isInteger = require( 'validate.io-integer-primitive' );\n```\n\n#### isInteger( value )\n\nValidates if a value is a `number` primitive, excluding `NaN`, and an `integer`.\n\n``` javascript\nvar bool = isInteger( 3 );\n// returns true\n```\n\n\n## Examples\n\n``` javascript\nvar isInteger = require( 'validate.io-integer-primitive' );\n\nconsole.log( isInteger( 3 ) );\n// returns true\n\nconsole.log( isInteger( Math.PI ) );\n// returns false\n\nconsole.log( isInteger( NaN ) );\n// returns false\n\nconsole.log( isInteger( new Number( 5 ) ) );\n// returns false\n\nconsole.log( isInteger( '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-integer-primitive.svg\n[npm-url]: https://npmjs.org/package/validate.io-integer-primitive\n\n[travis-image]: http://img.shields.io/travis/validate-io/integer-primitive/master.svg\n[travis-url]: https://travis-ci.org/validate-io/integer-primitive\n\n[coveralls-image]: https://img.shields.io/coveralls/validate-io/integer-primitive/master.svg\n[coveralls-url]: https://coveralls.io/r/validate-io/integer-primitive?branch=master\n\n[dependencies-image]: http://img.shields.io/david/validate-io/integer-primitive.svg\n[dependencies-url]: https://david-dm.org/validate-io/integer-primitive\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/validate-io/integer-primitive.svg\n[dev-dependencies-url]: https://david-dm.org/dev/validate-io/integer-primitive\n\n[github-issues-image]: http://img.shields.io/github/issues/validate-io/integer-primitive.svg\n[github-issues-url]: https://github.com/validate-io/integer-primitive/issues\n","_attachments":{},"homepage":"https://github.com/validate-io/integer-primitive#readme","bugs":{"url":"https://github.com/validate-io/integer-primitive/issues"}}