{"_id":"unique-random-array","_rev":"14-a91a07c9987ba44eb0f201a02c50c8b4","name":"unique-random-array","description":"Get consecutively unique elements from an array","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"unique-random-array","version":"1.0.0","description":"Get consecutively unique elements from an array","keywords":["unique","uniq","random","rand","number","single","generate","non-repeating","array","arr","item","element"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"files":["index.js"],"repository":{"type":"git","url":"https://github.com/sindresorhus/unique-random-array"},"scripts":{"test":"node test.js"},"dependencies":{"unique-random":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"engines":{"node":">=0.10.0"},"gitHead":"32027155885dfd1242192a05f84689f832e8d7e9","bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"homepage":"https://github.com/sindresorhus/unique-random-array","_id":"unique-random-array@1.0.0","_shasum":"42b3721c579388d8b667c93c2dbde3d5d81a9136","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"42b3721c579388d8b667c93c2dbde3d5d81a9136","tarball":"https://registry.npmjs.org/unique-random-array/-/unique-random-array-1.0.0.tgz","integrity":"sha512-vtj2yltjcHPa69nFjNJ3xnhsEwE8pMyjqUQDw2myz/iSezqf4YCAcygwFQEsOgMid5VNW/dCPbnb2BcmaDCCKg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICx753Frhi7O42ru2A7MRMfekaITKdr99KrcdOm3/84SAiEApBOQsmSgIxw3VgeTlKRtbzi69tKaOvvmFzvEzxhzCuc="}]},"directories":{}},"1.0.1":{"name":"unique-random-array","version":"1.0.1","description":"Get consecutively unique elements from an array","keywords":["unique","uniq","random","rand","number","single","generate","non-repeating","array","arr","item","element"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random-array.git"},"scripts":{"test":"ava"},"dependencies":{"unique-random":"^1.0.0"},"devDependencies":{"ava":"*"},"engines":{"node":">=0.10.0"},"gitHead":"e264ecd0a9f92d0a0d849f62e14cb4d32ce51cba","bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"homepage":"https://github.com/sindresorhus/unique-random-array#readme","_id":"unique-random-array@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-z9J/SV8CUIhIRROcHe9YUoAT6XthUJt0oUyLGgobiXJprDP9O9dsErNevvSaAv5BkhwFEVPn6nIEOKeNE6Ck1Q==","shasum":"f29bda2a62be8860a703c4739c8f4fdb4d722cc7","tarball":"https://registry.npmjs.org/unique-random-array/-/unique-random-array-1.0.1.tgz","fileCount":4,"unpackedSize":3579,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiJ4zOnRUWmr+3sdX+29e9H3W7yMe73G4lEzfqW2xQyAIhAN3R9O9/FPMVyqaF4kvW+oCiVO6zxK8sX9UIqfr3rDRR"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random-array_1.0.1_1521781940696_0.26286711348666336"},"_hasShrinkwrap":false},"2.0.0":{"name":"unique-random-array","version":"2.0.0","description":"Get consecutively unique elements from an array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random-array.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["unique","random","number","single","generate","non-repeating","array","item","element"],"dependencies":{"unique-random":"^2.1.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"04cc4d6a946d3f79709d5f32b1a9cc4ea358d806","bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"homepage":"https://github.com/sindresorhus/unique-random-array#readme","_id":"unique-random-array@2.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-xR87O95fZ7hljw84J8r1YDXrvffPLWN513BNOP4Bv0KcgG5dyEUrHwsvP7mVAOKg4Y80uqRbpUk0GKr8il70qg==","shasum":"9e639b1a9dc141e97350a6fc6f17da4b0717b1ad","tarball":"https://registry.npmjs.org/unique-random-array/-/unique-random-array-2.0.0.tgz","fileCount":5,"unpackedSize":4015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsOynCRA9TVsSAnZWagAAIzcP/jhCUSU8xClGJNnyzaJW\nUQ63nw6yeGftgTAZULcmZe0xgFhEBXMZ3ZVGZf9chV1Vr84Y20/dC7hAWITV\nzau3xJ5Fd3sFQ4dmkROzD4WzQluCeH21sUbvo8x/m3Ig8stytoTYKccPQrAF\nIHMeqjo3M3Pp0br4tTHzFZzpNVYxLuWVAu8Regomd9YNfkzsNU38rjnS+MqJ\nMNCtGNOdpZ/l/eJMRTVxp/n+W8Wx8pOajP3fizr53PVV1xBd+bvZCewShREW\nyr6T2agiadqTQ2jRiUCzwWFvDDSnLEG3rxTFsTWQY02HjOQbYjkc5nwBVUf4\nmSNNvNjGOu165Ih+QY6P+w/2i7IhrJR3byvwvIxJN7tKAW1nkoNUR8qqx7zG\nCnPj58kHJdBPs0rpa30XR24iXGT1Qy7bQ96d8YtAeW3Ba2mGV2mH3Pa72rHR\nKBTm7Pgwbc42qPm2tK3464NfZtI9+NX5lk8Oc1iin+6Kwv0HrQNbiLAR9RXm\n6a5BGFjI+trES19uIzE2+i4adJxsg+IZMlwmdvQorpB1Olax7Ws798ljyS54\nOdZFiKhzLaryJ3jsr6Clby5pOlJ7IMX1uuWgtYsztXpAwY62W9KrPu3JLyL0\na+7fgeFjS1gv4FEQYioKgRg16TE1AzTyZ8iEivaMtRIBbx1hb6N+DRWJLXKl\nNbZz\r\n=p9yK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZ1j3UTWxNRUT5uEYRZlyywV1AWzTNtF9C+dlk8v+7hAiEAj4j7KhFexTskcrTgYIfPpHPcv8GciKN2vHyKaB8fW8A="}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random-array_2.0.0_1555098791318_0.39118064605667513"},"_hasShrinkwrap":false},"3.0.0":{"name":"unique-random-array","version":"3.0.0","description":"Get consecutively unique elements from an array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random-array.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","array","item","element"],"dependencies":{"unique-random":"^3.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"8d08e8c1cc1ad1aadf5a731d8cd61eba79a1b0b7","bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"homepage":"https://github.com/sindresorhus/unique-random-array#readme","_id":"unique-random-array@3.0.0","_nodeVersion":"15.12.0","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-AETNmMf8dV7VfCu4pM5SO1nKkZZp3lZsbHk9VxkvR2ZjMYy4mzWwzez0g+ZtYIr+RaVH+UN8A003E7woM/ud7Q==","shasum":"db0c11c885d674c39050a79cf25d11b09ff97c22","tarball":"https://registry.npmjs.org/unique-random-array/-/unique-random-array-3.0.0.tgz","fileCount":5,"unpackedSize":3863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcFXlCRA9TVsSAnZWagAATCcP/iWqVEBmGoVoDn6+5P6G\n3xzRIQR6On1Dciv/zG4Eyo7cWxJEL9R+oTsbODiKkBvMa0EwBwMFojoXWGXH\nYjaI27jEuyC2zuJscI5C/IP089+jm4ZnauIYo+A5I/maOj/gS7Kj5Prr7BSQ\nLq103o6PTo3T21o447JAq/NJweeNF+Kz88VPWhO/RaDrfehASWC4OplaiOZ9\nRA9HypD1V+CGUr9Y5otbebsZkmk45HawPSh91CL/j3vK1yozjtmkcA8RFhhX\nmiVwnmamtUShItJVLlXhtWAymnR0Jo3OwusZg5Wgr+UUUc5jM1KbbAZAsV9R\nw+Z4k0tNrPBIOYGbKqyW9YZB+Aazxc9aOoNpUlViCwETGMsZR2D+hdj4VyVr\nvWlz0sn8n8KbMbTGURoZlnc0ssWGdwRxKSZccNXfxtreYyYe52GvO/dTk+hh\nHhpEgW+vshgzZeYLuWherxOSjcfX90OnD+tYIECkzQmi3otCAnmVtpzcaXWf\nAWeP/d95RHKmTSK06gx0GaNcINM3ortcsVFSbaF0YsFSQYgIemd4veHlwZLW\n0ISFKZ5ouyrQSNCzU0y3SzH77F0j0TZmRWrnozLJiBKENi7lXR2rTlYYfJ1k\nIJb6p75HGCm91/iFd7qGkfJ2jSDtULuYXidBjeJXMrQj0S/G6JuJSeBWKeeI\nPSq/\r\n=wb1r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG55RHK/U9veu4S8ajWb9pv0JPzd3UEsaLTCsrHzZnHaAiEA87297dZuK7b5nToKPh3Bb7VOaY9gMf2ljKOiWarn6a0="}]},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random-array_3.0.0_1617974756686_0.9076196723840382"},"_hasShrinkwrap":false},"4.0.0":{"name":"unique-random-array","version":"4.0.0","description":"Get consecutively unique elements from an array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random-array.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["unique","random","number","single","generate","non-repeating","array","item","element"],"dependencies":{"unique-random":"^4.0.0"},"devDependencies":{"ava":"^6.1.3","tsd":"^0.31.0","xo":"^0.58.0"},"_id":"unique-random-array@4.0.0","gitHead":"fb56011f354a2baa8b3536125d76805c0b6f3aff","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"homepage":"https://github.com/sindresorhus/unique-random-array#readme","_nodeVersion":"20.12.2","_npmVersion":"10.6.0","dist":{"integrity":"sha512-SCZc46g0PtZVKiVnL3ngE1murYDxduGtsCX5f+mvQ/MynUEbCeNGHUCtcsUoSZAejSxCSgNzSK5IdI5uxBbc+g==","shasum":"3a66975daf8e38508540b4381e73b81a454a9ccd","tarball":"https://registry.npmjs.org/unique-random-array/-/unique-random-array-4.0.0.tgz","fileCount":5,"unpackedSize":4312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiak5ypPWwYpgemIO8SXQkfp7feEFVmFBdRufvymZcxgIgV3UUsajMQXn0oWFe/kpFhvzDXPmH9UQEXo1bcE2Giss="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unique-random-array_4.0.0_1716033607153_0.23316989366648322"},"_hasShrinkwrap":false}},"readme":"# unique-random-array\n\n> Get consecutively unique elements from an array\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```sh\nnpm install unique-random-array\n```\n\n## Usage\n\n```js\nimport uniqueRandomArray from 'unique-random-array';\n\nconst random = uniqueRandomArray([1, 2, 3, 4]);\n\nconsole.log(random(), random(), random(), random());\n//=> 4 2 1 4\n```\n\n## API\n\n### uniqueRandomArray(array)\n\nReturns a function, that when called, will return a random element that's never the same as the previous, or `undefined` if the array is empty.\n\n#### array\n\nType: `unknown[]`\n\n## Related\n\n- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique\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- [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) - Generate a cryptographically strong random string\n","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2024-05-18T12:00:07.507Z","created":"2015-01-19T13:49:43.787Z","1.0.0":"2015-01-19T13:49:43.787Z","1.0.1":"2018-03-23T05:12:20.829Z","2.0.0":"2019-04-12T19:53:11.468Z","3.0.0":"2021-04-09T13:25:56.828Z","4.0.0":"2024-05-18T12:00:07.323Z"},"homepage":"https://github.com/sindresorhus/unique-random-array#readme","keywords":["unique","random","number","single","generate","non-repeating","array","item","element"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/unique-random-array.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/unique-random-array/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"vbv":true,"bharat67":true,"spences10":true,"ajduke":true,"rocket0191":true}}