{"_id":"unique-random","_rev":"2785586","name":"unique-random","description":"Generate random numbers that are consecutively unique","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2022-06-21T07:45:23.000Z","created":"2013-11-13T20:20:07.699Z","3.0.0":"2021-04-09T13:21:47.805Z","2.1.0":"2019-04-12T19:38:35.275Z","2.0.0":"2018-03-23T05:11:37.255Z","1.0.0":"2014-08-13T19:25:09.527Z","0.1.1":"2014-04-29T19:44:46.702Z","0.1.0":"2013-11-13T20:20:07.699Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https:/sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random.git"},"versions":{"3.0.0":{"name":"unique-random","version":"3.0.0","description":"Generate random numbers that are consecutively unique","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https:/sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["unique","random","number","single","generate","non-repeating","consecutively"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"e4dfe9653ac4e0faa87d5f941a22ecdf195d9a62","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random#readme","_id":"unique-random@3.0.0","_nodeVersion":"15.12.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ddf20e62d2f5af1dbd606602fb5b5821588c8469","size":1866,"noattachment":false,"key":"/unique-random/-/unique-random-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-3.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random_3.0.0_1617974507689_0.1030595766715392"},"_hasShrinkwrap":false,"publish_time":1617974507805,"_cnpm_publish_time":1617974507805,"_cnpmcore_publish_time":"2021-12-16T15:41:34.890Z"},"2.1.0":{"name":"unique-random","version":"2.1.0","description":"Generate random numbers that are consecutively unique","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["unique","random","number","single","generate","non-repeating","consecutively"],"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"e3c9fb9b3086839ee1dfc67751f7108d651cc137","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random#readme","_id":"unique-random@2.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"7a8413da5176d028567168b57125ac5c0cec5c25","size":1935,"noattachment":false,"key":"/unique-random/-/unique-random-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random_2.1.0_1555097915157_0.14883356738253584"},"_hasShrinkwrap":false,"publish_time":1555097915275,"_cnpm_publish_time":1555097915275,"_cnpmcore_publish_time":"2021-12-16T15:41:35.111Z"},"2.0.0":{"name":"unique-random","version":"2.0.0","description":"Generate random numbers that are consecutively unique","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["unique","uniq","random","rand","number","single","generate","non-repeating","consecutively"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"65cac73dac0aca2888db93976914a023ae846bb4","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random#readme","_id":"unique-random@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e502d9e2a8721921002ac40be28be3c80869d9f5","size":1818,"noattachment":false,"key":"/unique-random/-/unique-random-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random_2.0.0_1521781897147_0.4109740561702091"},"_hasShrinkwrap":false,"publish_time":1521781897255,"_cnpm_publish_time":1521781897255,"_cnpmcore_publish_time":"2021-12-16T15:41:35.347Z"},"1.0.0":{"name":"unique-random","version":"1.0.0","description":"Generate random numbers that are consecutively unique","keywords":["unique","random","rand","number","single","generate","non-repeating"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"files":["index.js"],"repository":{"type":"git","url":"https://github.com/sindresorhus/unique-random"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"fb783f82b680182eaf65defe1f75fe5ee8683261","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random","_id":"unique-random@1.0.0","_shasum":"ce3e224c8242cd33a0e77b0d7180d77e6b62d0c4","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"ce3e224c8242cd33a0e77b0d7180d77e6b62d0c4","size":919,"noattachment":false,"key":"/unique-random/-/unique-random-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-1.0.0.tgz"},"directories":{},"publish_time":1407957909527,"_hasShrinkwrap":false,"_cnpm_publish_time":1407957909527,"_cnpmcore_publish_time":"2021-12-16T15:41:35.560Z"},"0.1.1":{"name":"unique-random","version":"0.1.1","description":"Generate random numbers that are consecutively unique","keywords":["unique","random","rand","number","single","generate","non-repeating"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"files":["unique-random.js"],"main":"unique-random","repository":{"type":"git","url":"git://github.com/sindresorhus/unique-random"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random","_id":"unique-random@0.1.1","dist":{"shasum":"c4ccaabedaab8534e0f54daf5f10743ee5c692ad","size":1186,"noattachment":false,"key":"/unique-random/-/unique-random-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398800686702,"_hasShrinkwrap":false,"_cnpm_publish_time":1398800686702,"_cnpmcore_publish_time":"2021-12-16T15:41:35.774Z"},"0.1.0":{"name":"unique-random","version":"0.1.0","description":"Generate random numbers that are consecutively unique","keywords":["unique","random","rand","number","single","generate","non-repeating"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"files":["unique-random.js"],"main":"unique-random","repository":{"type":"git","url":"git://github.com/sindresorhus/unique-random.git"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"~1.14.0"},"engines":{"node":">=0.8.0"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"homepage":"https://github.com/sindresorhus/unique-random","_id":"unique-random@0.1.0","dist":{"shasum":"9a9039a431b30ee875ae0ec91fc49de6246af4ce","size":1188,"noattachment":false,"key":"/unique-random/-/unique-random-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unique-random/download/unique-random-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1384374007699,"_hasShrinkwrap":false,"_cnpm_publish_time":1384374007699,"_cnpmcore_publish_time":"2021-12-16T15:41:36.067Z"}},"readme":"# unique-random\n\n> Generate random numbers that are consecutively unique\n\nUseful for things like slideshows where you don't want to have the same slide twice in a row.\n\n## Install\n\n```\n$ npm install unique-random\n```\n\n## Usage\n\n```js\nimport uniqueRandom from 'unique-random';\n\nconst random = uniqueRandom(1, 10);\n\nconsole.log(random(), random(), random());\n//=> 5 2 6\n```\n\n## API\n\n### uniqueRandom(minimum, maximum)\n\nReturns a function, that when called, will return a random number that is never the same as the previous.\n\n## Related\n\n- [unique-random-array](https://github.com/sindresorhus/unique-random-array) - Get consecutively unique elements from an array\n- [random-int](https://github.com/sindresorhus/random-int) - Generate a random integer\n- [random-float](https://github.com/sindresorhus/random-float) - Generate a random float\n- [random-item](https://github.com/sindresorhus/random-item) - Get a random item from an array\n- [random-obj-key](https://github.com/sindresorhus/random-obj-key) - Get a random key from an object\n- [random-obj-prop](https://github.com/sindresorhus/random-obj-prop) - Get a random property from an object\n- [unique-random-at-depth](https://github.com/Aweary/unique-random-at-depth) - This module with an optional depth argument\n- [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) - Generate a cryptographically strong random string\n","_attachments":{},"homepage":"https://github.com/sindresorhus/unique-random#readme","bugs":{"url":"https://github.com/sindresorhus/unique-random/issues"},"license":"MIT"}