{"_id":"random-int","_rev":"13-915b9c8b3659886e156515ede0dad9db","name":"random-int","dist-tags":{"latest":"3.1.0"},"versions":{"1.0.0":{"name":"random-int","version":"1.0.0","keywords":["rand","random","randomize","int","integer","num","number","max","min","math","gen","generate","generator"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"random-int@1.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/random-int","bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"dist":{"shasum":"e6a2ed3448ac9c6646a0657443b1c1521592ed08","tarball":"https://registry.npmjs.org/random-int/-/random-int-1.0.0.tgz","integrity":"sha512-mFCC/eAtuTW3BOYEoKPDwa5iUC3NxClZ0uqJz7wL1e2yHlCP9b5Mt8hsplBGSpeGLV0kymTyTdf14Hp2/HiW8Q==","signatures":[{"sig":"MEUCIGuc8snbEOAG6lwwaNLSSnlHIwJG3KO1Viks8CExaB2uAiEAi8JYpNjmwZm4pAzA5ql9lS8LktKhUW+2Ulo7hLzjBHM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"e6a2ed3448ac9c6646a0657443b1c1521592ed08","engines":{"node":">=0.10.0"},"gitHead":"515c1fdbb87b496c95c77e34f9fe9268c3a9cf7a","scripts":{"test":"node test.js"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"https://github.com/sindresorhus/random-int","type":"git"},"_npmVersion":"2.11.2","description":"Generate a random integer","directories":{},"_nodeVersion":"0.12.5","devDependencies":{"ava":"0.0.4","in-range":"^1.0.0","stable-fn":"^1.0.0","number-is-integer":"^1.0.0"}},"2.0.0":{"name":"random-int","version":"2.0.0","keywords":["rand","random","randomize","int","integer","number","max","min","math","generate","generator"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"random-int@2.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/random-int#readme","bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"dist":{"shasum":"0979bdef46207a11dbfdbf6cae980351ba8946ab","tarball":"https://registry.npmjs.org/random-int/-/random-int-2.0.0.tgz","fileCount":5,"integrity":"sha512-jCJ4a8BJ+z3f4SYSFtYIiRfcdxe2Bvh+Gg2J+LjriL3dVOtrF77u0tklYbO8acHoZQ7JlYJn3lNKfW5TFjcwdQ==","signatures":[{"sig":"MEYCIQCbHYq6dvU8TRSLsG2TuQy7W6c4uC/0HUrRUaEsZNfB2wIhAOKqXMzROTij37tqSbhptQWzHTThqiQhLj+HIa9Jndbz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrsvNCRA9TVsSAnZWagAAIgsP/2T5C6FOZ5iM9eRSeS2t\nQPxW0l2nPSmW0XjSNJlZSgBgaz9+ZOIWvS5t5DbAGqisH9140udKDE3AxaXc\n6b2uYTA3KrH6NyoQBVsnViTE+8p1WbuTeQk4UhmSuG17vMycoju68LVz9xDC\nDWcm66fBHoe5L619feUcEiqJphTEZkoGJuQNF7GcVWrKsidLNn2Vd0YDDmzv\nKuQDzQy/kyBymumNa1P1uoQ2EcujMAxRKeEO3vS+iCBRnxknnYKcL2CoPeuH\nc24HjEqy422ALL1iE2hM+AQJfi8+AQxgQy6UkaFuUuwM1FOn5ItP2o7guX+e\nr0xNdIRCsXkyzCdz92OeYGAoT21ididn7VssI3cTvPyzmsIlp7qZsveCtwSv\nXoSsye2PKdAsl8sjoWUCCgtaCHL+Fh/IooDISIYgaUEMUKmu+pI3ucnO3f23\ncgdaxBANJB/Y7yP7S8+pmw4TYV9am7zl7J2f6iVY2P83Vmg/JIyHUnhhRHax\nfyMGsy+ciLRTXH2OePLMphQXU757gaQJ2pSEuNxKOEBHpCXCVZeWL6su5qU1\nkTSq6Q9UKNQcS4kzLCRyFeHt4nSK6Zny5U2G504PZKG0iKildA9/scmKAwSa\nHETqC5fyXEwG4vLZAyMdfLgsEVMWnxElT6Eu+cO9/w+GnzP8ZcE37YnJE+kc\n9WPm\r\n=4SxR\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8"},"gitHead":"7ab2dd39099b5577527eaad5e548f3f2fbdf5784","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/random-int.git","type":"git"},"_npmVersion":"6.4.1","description":"Generate a random integer","directories":{},"_nodeVersion":"10.15.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2","in-range":"^2.0.0","stable-fn":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/random-int_2.0.0_1554959308538_0.27391851100245757","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"random-int","version":"2.0.1","keywords":["rand","random","randomize","int","integer","number","max","min","math","generate","generator"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"random-int@2.0.1","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/random-int#readme","bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"dist":{"shasum":"d072fe298e2fd12a730edde7729168b7b88dcea3","tarball":"https://registry.npmjs.org/random-int/-/random-int-2.0.1.tgz","fileCount":5,"integrity":"sha512-YALjWK2Rt9EMIv9BF/3mvlzFWQathsvb5UZmN1QmhfIOfcQYXc/UcLzg0ablqesSBpBVLt2Tlwv/eTuBh4LXUQ==","signatures":[{"sig":"MEYCIQC+ZNCWYMoud3nSPpCc0DhMBhQ23/GhDiZtzgjXq6/FywIhAO9IxG+ILbubl6YmWZClO4cZMUq6ZN3FRil9JTmTdQD/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfKUwCRA9TVsSAnZWagAAOKkQAJQksMx+zAgU2aerHBL1\nRWIOv7NK4Ndodt0lR2dvp+4rnFqkJjhWxI4wPFcQEkPMjmPLgihkBkgz8Zxr\nQ9287AggtRueAyhokWgcLt5SKR+vjxCiyorOfDsKF7R9fW0JdXwEJ2r4b9tK\nBbZitJ4/r4xO7VxJ1/hqaoUSXrzKK5Vtcj0Ia9jsEiTytkfme1D+UZzWfvUd\n1qfJlkNu1uiopjztSS/pEkDjcPg1o0/yXiREhzb/Bw7hshlIIJ60IOuXYSHg\niZFlwBeMnpbIvaSRWwdonylEB0xbDeDBWGUycc/5zRrqgKIVsbZu4mK7t/pK\nzPyi7xQCObIww+b2hQ+8WmU3gvyELpICaePqplQu9IM/hYmane28SWifa+gS\norB1ABqJ2SmwvWjIGHSFSbrjkf4QJXOP+MKeUfpt19edpfvfgJ+uAFRn73uK\npjYUDqZx17HFXoyufgZu7PSihEoX3QXqkildzESKWxhYeUNUxgyU8GsI0YCD\nllbNHhfX6jC+jj0RKRPcRQ1uakaxEWyUMcgzf1O8uofyPjgUc+eorBMzlYxM\ngtNpCfRk8VQkOAv8KcTZZ5sO3/ebVBrd8R9L59hSXc/f2IGpfNpxoqGDdYSY\nWPZ5UDsqZ/rZy79NM6Yj+eP+t0pkDlTvcOf9TcmMXPPfWLQGKNYCpmL43Yiq\nldQW\r\n=ckxT\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8"},"gitHead":"c37741b56f76b9160b0b63dae4e9c64875128146","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/random-int.git","type":"git"},"_npmVersion":"6.11.3","description":"Generate a random integer","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2","in-range":"^2.0.0","stable-fn":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/random-int_2.0.1_1568449839235_0.22795215734552476","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"random-int","version":"3.0.0","keywords":["random","randomize","int","integer","number","max","min","math","generate","generator"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"random-int@3.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/random-int#readme","bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"dist":{"shasum":"69782559c9306c43de1dd174ea616330ef75b749","tarball":"https://registry.npmjs.org/random-int/-/random-int-3.0.0.tgz","fileCount":5,"integrity":"sha512-QvewnOwigesW2WFyTHiQzR6XUUcSQO/BqmfgRz5N5GpGrKQnTf7ebMz8UtuwaET8IfO1n0wLx8/fHsI8E0Jpow==","signatures":[{"sig":"MEQCIBWfSL1PbdommP16VCH0KMvsTzt7afZmBS+KenSD6jzhAiByY0SNqvq+XM1l6kQ+Gsalqyh78jiJJaVTalPK30YaEw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeyKmCRA9TVsSAnZWagAAAwgP/1y40y1/l/hOqvDqsD6y\npEibjYqST73yCMCJHOtqAMTOktfEhHe4OMGW2mhowjFQS5mufETsDXSqU8Rf\nA1kjoxjEQnNHhWHZbfu/v9AhClBMkmuyNF4XyuGnPiQDBkNlirJKejtj2EOw\nFeFYXaWMecfbVjHm7EjFwj2WnbIybqLg7fHW7KKAHFFVo0F3fvSFHl2d3+yS\n2ZPv5ydrPICEUCf93yV0j0s6kKgiWUUT+MIpHXPK8sJzUDH8rA89Z1ZokGau\nIxd9aPquwRnbgrA43Ejd03efUDTgCMIEM6f+ME6Kp4I976NCkzzF2ukIlBI/\ncAJTrnVTCTbjWg4ifEgkfR4svV5H6Ab1GZmN3VJCW3fMYBGtTnVM8cgkHvMl\nWgcjIjUo1R10rY7drmQEf5xK0psYTyPwwAmLiGkQgkieHEV5FBiqI4F34FdM\nQdM1R/f+HdRDuU2lRQTgMbGBN1+p2TPI3qPx+pRCARQ19uq+6V674qMl/fJP\nMSx1TEex7fqzdg78RsPfzFLzET5PA+YeDPfLsfQN0x/q6TLzmcrS5Uv4p8HP\nDHUi17BvP60qF3cYmwY7KjC2iOyqohOrWKMmmoGjD5ORX52Sx26V2wLOzVVL\nlewUWdWF3NlkcNK6xTGt3tXfxy3GMjBX59uTz7n3p/WcxYS93LUbEXW56D16\nBoLT\r\n=ElOW\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","engines":{"node":">=12"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"1b0bc5861b1256abd456ced258239f1251dc48a9","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/random-int.git","type":"git"},"_npmVersion":"6.14.10","description":"Generate a random integer","directories":{},"_nodeVersion":"12.22.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.38.2","ava":"^3.15.0","tsd":"^0.14.0","in-range":"^3.0.0","stable-fn":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/random-int_3.0.0_1618682534398_0.7190264400266932","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"random-int","version":"3.1.0","description":"Generate a random integer","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/random-int.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":">=12"},"scripts":{"//test":"xo && ava && tsd","test":"ava"},"keywords":["random","randomize","int","integer","number","max","min","math","generate","generator"],"devDependencies":{"ava":"^3.15.0","in-range":"^3.0.0","stable-function":"^4.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"_id":"random-int@3.1.0","gitHead":"f322b1367550b95898264ad158a41695af60bfdf","bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"homepage":"https://github.com/sindresorhus/random-int#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-h8CRz8cpvzj0hC/iH/1Gapgcl2TQ6xtnCpyOI5WvWfXf/yrDx2DOU+tD9rX23j36IF11xg1KqB9W11Z18JPMdw==","shasum":"ab096f7106c83cdcea975b0b0d4394417677609e","tarball":"https://registry.npmjs.org/random-int/-/random-int-3.1.0.tgz","fileCount":5,"unpackedSize":4389,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9zCTyD/Wpk3+bkNk93AZgJju+Ueefl8d4wF00Gqo5+gIhALvGd1KRReuNLczHFySHmjYaF1xRIK6sGkMBw1n3dPXO"}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/random-int_3.1.0_1757938003904_0.7195050625452992"},"_hasShrinkwrap":false}},"time":{"created":"2015-06-26T22:26:10.326Z","modified":"2025-09-15T12:06:44.280Z","1.0.0":"2015-06-26T22:26:10.326Z","2.0.0":"2019-04-11T05:08:28.680Z","2.0.1":"2019-09-14T08:30:39.409Z","3.0.0":"2021-04-17T18:02:14.535Z","3.1.0":"2025-09-15T12:06:44.083Z"},"bugs":{"url":"https://github.com/sindresorhus/random-int/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/random-int#readme","keywords":["random","randomize","int","integer","number","max","min","math","generate","generator"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/random-int.git"},"description":"Generate a random integer","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# random-int\n\n> Generate a random integer\n\n## Install\n\n```sh\nnpm install random-int\n```\n\n## Usage\n\n```js\nimport randomInteger from 'random-int';\n\nrandomInteger(5);\n//=> 3\n\nrandomInteger(10, 100);\n//=> 54\n```\n\n## API\n\n### randomInteger(maximum?)\n\nReturns an integer from `0` to `maximum`.\n\n### randomInteger(minimum, maximum)\n\nReturns an integer from `minimum` to `maximum`.\n\nIf `minimum` is greater than `maximum`, the values are swapped to return an integer from the lower value to the higher value.\n\n#### minimum\n\nType: `number`\\\nDefault: `0`\n\nMinimum integer to return.\n\n#### maximum\n\nType: `number`\\\nDefault: `1`\n\nMaximum integer to return.\n\n## Related\n\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-object-key](https://github.com/sindresorhus/random-object-key) - Get a random key from an object\n- [random-object-value](https://github.com/sindresorhus/random-object-value) - Get a random value from an object\n- [unique-random](https://github.com/sindresorhus/unique-random) - Generate random numbers that are consecutively unique\n- [unique-random-array](https://github.com/sindresorhus/unique-random-array) - Get consecutively unique elements from an array\n- [crypto-random-string](https://github.com/sindresorhus/crypto-random-string) - Generate a cryptographically strong random string\n","readmeFilename":"readme.md","users":{"jehoshua02":true,"rocket0191":true,"seangenabe":true,"gzg1500521074":true}}