{"_id":"random-natural","_rev":"2906423","name":"random-natural","description":"Return a natural number.","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"bubkoo","email":""}],"time":{"modified":"2022-12-14T07:21:10.000Z","created":"2016-04-04T20:35:45.798Z","1.0.3":"2016-04-25T03:43:42.326Z","1.0.2":"2016-04-23T16:26:22.431Z","1.0.1":"2016-04-19T06:34:04.626Z","1.0.0":"2016-04-15T17:27:56.135Z","0.0.0":"2016-04-04T20:35:45.798Z"},"users":{},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-natural.git"},"versions":{"1.0.3":{"name":"random-natural","version":"1.0.3","description":"Return a natural number.","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":["natural","integer","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mock-end/random-natural/issues"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-natural.git"},"homepage":"https://github.com/mock-end/random-natural#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":{"max-safe-int":"^1.0.0","random-integral":"^1.0.3"},"gitHead":"bc57637b486c9e891c4386d528101c1bd1ad5c9e","_id":"random-natural@1.0.3","_shasum":"ef28615b03c2cb71aaebf7f24f487266a443c5c0","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"ef28615b03c2cb71aaebf7f24f487266a443c5c0","size":2381,"noattachment":false,"key":"/random-natural/-/random-natural-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-natural/download/random-natural-1.0.3.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-natural-1.0.3.tgz_1461555819063_0.7559730969369411"},"directories":{},"publish_time":1461555822326,"_hasShrinkwrap":false,"_cnpm_publish_time":1461555822326,"_cnpmcore_publish_time":"2021-12-16T19:38:44.639Z"},"1.0.2":{"name":"random-natural","version":"1.0.2","description":"Return a natural number.","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":["natural","int","integer","num","number","generator","generate","random","randomly","randomize","chance","test","dice","mock"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mock-end/random-natural/issues"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-natural.git"},"homepage":"https://github.com/mock-end/random-natural#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","random-integral":"^1.0.2","to-integer":"^1.0.1"},"gitHead":"b1a10d93105eea8a14ce9a165c71e37a928542f0","_id":"random-natural@1.0.2","_shasum":"bc74e26a99cf815ed903039352881a4c49b3a436","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"bc74e26a99cf815ed903039352881a4c49b3a436","size":2226,"noattachment":false,"key":"/random-natural/-/random-natural-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-natural/download/random-natural-1.0.2.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/random-natural-1.0.2.tgz_1461428779523_0.10838638921268284"},"directories":{},"publish_time":1461428782431,"_hasShrinkwrap":false,"_cnpm_publish_time":1461428782431,"_cnpmcore_publish_time":"2021-12-16T19:38:44.874Z"},"1.0.1":{"name":"random-natural","version":"1.0.1","description":"Generate a random natural number.","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","bugs":{"url":"https://github.com/mock-end/random-natural/issues"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-natural.git"},"homepage":"https://github.com/mock-end/random-natural#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","random-integral":"^1.0.0"},"gitHead":"872cd35e80a99846284cd93baca1f751c8633b9f","_id":"random-natural@1.0.1","_shasum":"cecadc91e07a765565cfd931431a0878411a63e3","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"cecadc91e07a765565cfd931431a0878411a63e3","size":2416,"noattachment":false,"key":"/random-natural/-/random-natural-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-natural/download/random-natural-1.0.1.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-natural-1.0.1.tgz_1461047641967_0.9286879564169794"},"directories":{},"publish_time":1461047644626,"_hasShrinkwrap":false,"_cnpm_publish_time":1461047644626,"_cnpmcore_publish_time":"2021-12-16T19:38:45.064Z"},"1.0.0":{"name":"random-natural","version":"1.0.0","description":"Generate a random natural number.","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","bugs":{"url":"https://github.com/mock-end/random-natural/issues"},"repository":{"type":"git","url":"git+https://github.com/mock-end/random-natural.git"},"homepage":"https://github.com/mock-end/random-natural#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","random-integral":"^1.0.0"},"gitHead":"d5aa10b3b3d19b0c0e9af5656c7364156aa194d1","_id":"random-natural@1.0.0","_shasum":"3ee4c496524b49971b8333b0db5f59dd478f9bbe","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"3ee4c496524b49971b8333b0db5f59dd478f9bbe","size":2408,"noattachment":false,"key":"/random-natural/-/random-natural-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-natural/download/random-natural-1.0.0.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-natural-1.0.0.tgz_1460741275479_0.2173677773680538"},"directories":{},"publish_time":1460741276135,"_hasShrinkwrap":false,"_cnpm_publish_time":1460741276135,"_cnpmcore_publish_time":"2021-12-16T19:38:45.289Z"},"0.0.0":{"name":"random-natural","version":"0.0.0","description":"Generate a random natural number.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/random-natural.git"},"author":{"name":"bubkoo","email":"bubkoo@163.com","url":"https://github.com/bubkoo"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/random-natural/issues"},"homepage":"https://github.com/bubkoo/random-natural#readme","gitHead":"9dc71d809fca1ba3943900436005343c054986d1","_id":"random-natural@0.0.0","_shasum":"53b7bc664b67d38063f3683da688d9434f1a1599","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo@163.com"},"dist":{"shasum":"53b7bc664b67d38063f3683da688d9434f1a1599","size":1086,"noattachment":false,"key":"/random-natural/-/random-natural-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/random-natural/download/random-natural-0.0.0.tgz"},"maintainers":[{"name":"bubkoo","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/random-natural-0.0.0.tgz_1459802143275_0.35936796362511814"},"directories":{},"publish_time":1459802145798,"_hasShrinkwrap":false,"_cnpm_publish_time":1459802145798,"_cnpmcore_publish_time":"2021-12-16T19:38:45.481Z"}},"readme":"# random-natural\n\n> Return a [natural number](https://en.wikipedia.org/wiki/Natural_number).\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/mock-end/random-natural/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/mock-end/random-natural/master.svg?style=flat-square)](https://travis-ci.org/mock-end/random-natural)\n[![coverage:?](https://img.shields.io/coveralls/mock-end/random-natural/master.svg?style=flat-square)](https://coveralls.io/github/mock-end/random-natural)\n\n\n## Install\n\n```\n$ npm install --save random-natural\n```\n\n## Usage\n\n> For more use-cases see the [tests](https://github.com/mock-end/random-natural/blob/master/test/spec/index.js)\n\n```js\nvar randomNatural = require('random-natural');\n\n// API\n// - randomNatural([options])\n\n// options\n// - min\n// - max\n```\n\nBy default it will return an integer between `0` and `9007199254740992`:\n\n```js\nrandomNatural();\n// => 9527\n```\n\nCan optionally provide min and max:\n\n```js\nrandomNatural({ max: 5 });\n// => 3\n\nrandomNatural({ min: 10, max: 100 });\n// => 66\n```\n\n**Note**:\n\nThese `min` and `max` are **inclusive**, so they are included in the range.\n\nThis means `randomNatural({ min: 1, max: 3 })` would return either `1`, `2`, or `3`.\n\n```js\n// Specific case\n1 <= random number <= 3\n\n// General case\nmin <= random number <= max\n```\n\n## Related\n\n- [random-integral](https://github.com/mock-end/random-integral) - Return a random integer.\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-natural/issues/new).\n","_attachments":{},"homepage":"https://github.com/mock-end/random-natural#readme","bugs":{"url":"https://github.com/mock-end/random-natural/issues"},"license":"MIT"}