{"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":"http://registry-npm.ywwl.com/random-int/download/random-int-3.1.0.tgz","fileCount":5,"unpackedSize":4389,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9zCTyD/Wpk3+bkNk93AZgJju+Ueefl8d4wF00Gqo5+gIhALvGd1KRReuNLczHFySHmjYaF1xRIK6sGkMBw1n3dPXO"}],"size":1965,"noattachment":false,"key":"/random-int/-/random-int-3.1.0.tgz"},"_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,"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","publish_time":1757938004083,"_cnpm_publish_time":1757938004083,"dist-tags":{"latest":"3.1.0"}}