{"_id":"random-integral","_rev":"2906439","name":"random-integral","description":"Return a random integer.","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"bubkoo","email":""}],"time":{"modified":"2022-12-14T07:21:23.000Z","created":"2016-04-15T16:40:55.361Z","1.0.3":"2016-04-25T03:10:23.306Z","1.0.2":"2016-04-23T16:24:28.583Z","1.0.1":"2016-04-19T06:44:05.257Z","1.0.0":"2016-04-15T17:17:00.787Z","0.0.0":"2016-04-15T16:40:55.361Z"},"users":{},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"versions":{"1.0.3":{"name":"random-integral","version":"1.0.3","description":"Return a random integer.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","watch":"onchange 'index.js' 'test/**/*.js' -e 'test/coverage/**/*.js' -- npm test","prepublish":"npm test"},"keywords":["int","integer","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"homepage":"https://github.com/mock-end/random-integral#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5","onchange":"^2.4.0"},"dependencies":{"clamp":"^1.0.1","max-safe-int":"^1.0.0","to-integer":"^1.0.1"},"gitHead":"37e2ed234576e488366f1f6e38efeb8e66d6506d","_id":"random-integral@1.0.3","_shasum":"8ff3c117565c9a04b66ddd559f3aed29bd0f0f6c","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"8ff3c117565c9a04b66ddd559f3aed29bd0f0f6c","size":2595,"noattachment":false,"key":"/random-integral/-/random-integral-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-integral/download/random-integral-1.0.3.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-integral-1.0.3.tgz_1461553820013_0.4545624991878867"},"directories":{},"publish_time":1461553823306,"_hasShrinkwrap":false,"_cnpm_publish_time":1461553823306,"_cnpmcore_publish_time":"2021-12-16T21:12:38.390Z"},"1.0.2":{"name":"random-integral","version":"1.0.2","description":"Return a random integer.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","watch":"onchange 'index.js' 'test/**/*.js' -e 'test/coverage/**/*.js' -- npm test","prepublish":"npm test"},"keywords":["int","integer","num","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"homepage":"https://github.com/mock-end/random-integral#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5","onchange":"^2.4.0"},"dependencies":{"clamp":"^1.0.1","max-safe-int":"^1.0.0","to-integer":"^1.0.1"},"gitHead":"33364eda009f0a078426a708d29797ba982e4e52","_id":"random-integral@1.0.2","_shasum":"3821f7cfa860d489b68b4446410ca5b047ab2a04","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"3821f7cfa860d489b68b4446410ca5b047ab2a04","size":2287,"noattachment":false,"key":"/random-integral/-/random-integral-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-integral/download/random-integral-1.0.2.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-integral-1.0.2.tgz_1461428668077_0.29917693929746747"},"directories":{},"publish_time":1461428668583,"_hasShrinkwrap":false,"_cnpm_publish_time":1461428668583,"_cnpmcore_publish_time":"2021-12-16T21:12:38.610Z"},"1.0.1":{"name":"random-integral","version":"1.0.1","description":"Generate a random integer.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["generator","generate","gen","random","randomize","rand","natural","int","integer","num","number","max","min","math"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"homepage":"https://github.com/mock-end/random-integral#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"clamp":"^1.0.1","to-integer":"^1.0.1"},"gitHead":"505cd323bbbf6003c75e2cbd36204ce8bc93a948","_id":"random-integral@1.0.1","_shasum":"b8bb32bef210f4f7c21720a6cf811108d62914a0","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"b8bb32bef210f4f7c21720a6cf811108d62914a0","size":2495,"noattachment":false,"key":"/random-integral/-/random-integral-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-integral/download/random-integral-1.0.1.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-integral-1.0.1.tgz_1461048243921_0.13564261817373335"},"directories":{},"publish_time":1461048245257,"_hasShrinkwrap":false,"_cnpm_publish_time":1461048245257,"_cnpmcore_publish_time":"2021-12-16T21:12:38.796Z"},"1.0.0":{"name":"random-integral","version":"1.0.0","description":"Generate a random integer.","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["generator","generate","gen","random","randomize","rand","natural","int","integer","num","number","max","min","math"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"homepage":"https://github.com/mock-end/random-integral#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"clamp":"^1.0.1","to-integer":"^1.0.1"},"gitHead":"ed489fc11c3fbc9201e3a654e4a0a1afbb77ae19","_id":"random-integral@1.0.0","_shasum":"8ff2fd8264f27845cbf3e4d74c6aadb3e3712549","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"8ff2fd8264f27845cbf3e4d74c6aadb3e3712549","size":2488,"noattachment":false,"key":"/random-integral/-/random-integral-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-integral/download/random-integral-1.0.0.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-integral-1.0.0.tgz_1460740615491_0.967091983417049"},"directories":{},"publish_time":1460740620787,"_hasShrinkwrap":false,"_cnpm_publish_time":1460740620787,"_cnpmcore_publish_time":"2021-12-16T21:12:39.028Z"},"0.0.0":{"name":"random-integral","version":"0.0.0","description":"Generate a random integer.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-integral.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"homepage":"https://github.com/mock-end/random-integral#readme","gitHead":"e5241ca963499abd76aa2ef04524a13f2c47dab7","_id":"random-integral@0.0.0","_shasum":"bd8bea4f5faa0d43a3bd4a00e46ce21c5d9dc29d","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"bd8bea4f5faa0d43a3bd4a00e46ce21c5d9dc29d","size":1090,"noattachment":false,"key":"/random-integral/-/random-integral-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-integral/download/random-integral-0.0.0.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-integral-0.0.0.tgz_1460738454701_0.4838233881164342"},"directories":{},"publish_time":1460738455361,"_hasShrinkwrap":false,"_cnpm_publish_time":1460738455361,"_cnpmcore_publish_time":"2021-12-16T21:12:39.221Z"}},"readme":"# random-integral\n\n> Return a random integer.\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/mock-end/random-integral/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/mock-end/random-integral/master.svg?style=flat-square)](https://travis-ci.org/mock-end/random-integral)\n[![coverage:?](https://img.shields.io/coveralls/mock-end/random-integral/master.svg?style=flat-square)](https://coveralls.io/github/mock-end/random-integral)\n\n\n## Install\n\n```\n$ npm install --save random-integral\n```\n\n## Usage\n\n> For more use-cases see the [tests](https://github.com/mock-end/random-integral/blob/master/test/spec/index.js)\n\n\n```js\nvar randomInt = require('random-integral');\n\n// API\n// - randomInt([options])\n```\n\nBy default it will return an integer between `-9007199254740992` and `9007199254740992`:\n\n```js\nrandomInt();\n// => -1293235\n```\n\nCan optionally provide min and max:\n\n```js\nrandomInt({ max: 5 });\n// => -33569\n\nrandomInt({ min: 10, max: 100 });\n// => 66\n\nrandomInt({ min: -100, max: -10 });\n// => -57\n```\n\n**Note**:\n\nThese `min` and `max` are **inclusive**, so they are included in the range.\n\nThis means `randomInt({ min: -2, max: 2 })` would return either `-2`, `-1`, `0`, `1`, or `2`.\n\n```js\n// Specific case\n-2 <= random number <= 2\n\n// General case\nmin <= random number <= max\n```\n\n## Related\n\n- [random-natural](https://github.com/mock-end/random-natural) - Return a random natural number.\n- [random-bool](https://github.com/mock-end/random-bool) - Return a random boolean (true/false).\n- [random-char](https://github.com/mock-end/random-char) - Return a random char.\n- [random-index](https://github.com/mock-end/random-index) - Return a random array-like index.\n- [random-decimal](https://github.com/mock-end/random-decimal) - Return a random decimal.\n- [random-binary](https://github.com/mock-end/random-binary) - Return a random binary number.\n- [random-octal](https://github.com/mock-end/random-octal) - Return a random octal number.\n- [random-hexadecimal](https://github.com/mock-end/random-hexadecimal) - Return a random hexadecimal number.\n- [random-unicode](https://github.com/mock-end/random-unicode) - Return a random unicode. \n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/mock-end/random-integral/issues/new).\n","_attachments":{},"homepage":"https://github.com/mock-end/random-integral#readme","bugs":{"url":"https://github.com/mock-end/random-integral/issues"},"license":"MIT"}