{"_id":"randoma","_rev":"9-1288cc1cf77f88d18b706814f84bdd08","name":"randoma","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"randoma","version":"1.0.0","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"randoma@1.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/randoma#readme","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"dist":{"shasum":"e4d5e3d8bcea9f71dcf8f02222d4334bfc7e5dc8","tarball":"https://registry.npmjs.org/randoma/-/randoma-1.0.0.tgz","integrity":"sha512-8TUm2L2/NLethrD+O14f50k9nSvuFlfARbIa4kB/KuYQHYJc5LRyFA+r9jekf7q58Hw/tjBFJ/8PHiEJ3I4AWg==","signatures":[{"sig":"MEYCIQCr674GQMwNZNGYMyrJukCyH7UGdUv6ZiReYAW6//tj2wIhAOhC5AgzmZ5uuKsSE8xi7XKASaG+ZPNckiaA0Tbx9GWH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"files":["index.js"],"engines":{"node":">=6"},"gitHead":"6f4c4babaf4991c122960b0d576857457312ee59","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/randoma.git","type":"git"},"_npmVersion":"5.6.0","description":"User-friendly pseudorandom number generator (PRNG)","directories":{},"_nodeVersion":"8.9.4","dependencies":{"park-miller":"^1.0.0","@sindresorhus/string-hash":"^1.0.0"},"devDependencies":{"xo":"*","ava":"*","@sindresorhus/is":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/randoma-1.0.0.tgz_1515854730121_0.25213708635419607","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"randoma","version":"1.1.0","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"randoma@1.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/randoma#readme","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"dist":{"shasum":"bc04b881acef7e35b2c6f1bc00f7c93f476f206a","tarball":"https://registry.npmjs.org/randoma/-/randoma-1.1.0.tgz","integrity":"sha512-5W2tdzM8YehBSJdyI3aa4Ivep8Q9Fr9bu8vq950zORT/e5UrdaxC62oC3h2Y9npvmgXRxbFTmd3TKla2CcEzLA==","signatures":[{"sig":"MEUCIHqeUhJDr+bJ5vukXSyW1IWs8JWVM3L5yvE8muxZnMKWAiEAi+gJsYdNCj+qknh+ckStUo8ZQFTsXkumm1iSY7i9bow=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"files":["index.js"],"engines":{"node":">=6"},"gitHead":"e281bf4a445c8c2e9ee64b7d71eb7d800c0442d0","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/randoma.git","type":"git"},"_npmVersion":"5.6.0","description":"User-friendly pseudorandom number generator (PRNG)","directories":{},"_nodeVersion":"8.9.4","dependencies":{"color":"^2.0.1","park-miller":"^1.0.0","@sindresorhus/string-hash":"^1.0.0"},"devDependencies":{"xo":"*","ava":"*","@sindresorhus/is":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/randoma-1.1.0.tgz_1516710991397_0.7191763401497155","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"randoma","version":"1.2.0","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"randoma@1.2.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/randoma#readme","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"dist":{"shasum":"a14df5a02b0ddc6bb20ce69358da2f47a768b550","tarball":"https://registry.npmjs.org/randoma/-/randoma-1.2.0.tgz","fileCount":4,"integrity":"sha512-m7W2Eg8+6iXge4zH0y7qXRykoLF2WJd7AfSUSZa9LvxHBlEd3w49Bao2Tm1/nkTpp7ZsxS2Ur2jpSwbyQjkOKA==","signatures":[{"sig":"MEUCIQDtph/iGswNEybF5pdqDJAP4+mdgseSzaZ6qvvwuTU1OAIgHB69q2WvO1vc0+bnn3/PZehR5ee7a1yZ52DWluXT9fU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5147},"files":["index.js"],"engines":{"node":">=6"},"gitHead":"b7e53eec19b0150fc449d8e0c105325a8585925b","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/randoma.git","type":"git"},"_npmVersion":"5.6.0","description":"User-friendly pseudorandom number generator (PRNG)","directories":{},"_nodeVersion":"8.9.4","dependencies":{"color":"^2.0.1","park-miller":"^1.0.0","@sindresorhus/string-hash":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"*","ava":"*","@sindresorhus/is":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/randoma_1.2.0_1520321773467_0.8346910696654664","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"randoma","version":"1.3.0","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"randoma@1.3.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/randoma#readme","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"dist":{"shasum":"adf382394f15202947062a2ae02e81374e94acad","tarball":"https://registry.npmjs.org/randoma/-/randoma-1.3.0.tgz","fileCount":5,"integrity":"sha512-bi5f+w340fQ9LI4R4xYQd/YwrasOOZBPKNneSfZoCfwKYGFOVCNHilUKVzpzovS1iYY+NF/lsn5FW+EaxPBOPg==","signatures":[{"sig":"MEQCIHBbn5cHKgM9/VO2e8y+kpm/QK715L9XZ4x25LpxbDNiAiBMage3ABTZLuofmlJOjIgZgxSouRgyI1fR67WOF3qvuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcv9qMCRA9TVsSAnZWagAA660QAJnC1xTP3ZkIew+yQoed\nhErqA+VXUxe9Ku0la9fB0letQxPhnPJulNEHxRKlxK9Thmm/F+lGNmF3WPEN\n1LbMWS6QUAMcQ9hnoYCjHa6/4tyz4XYRY8K1XBGBYafCje4IfepGf0jLI/Bg\nHwfsNQqhlA5EOY0ALihfVLVK8qWVjd5dXsX3ZPAoWdP3O6RE5ZSGZYaLmxqy\nWbWZd1o92xspijhSUhopRUBy2VFR/9KSXWa76bDzo32RBkA3MyK2BT0mYGDI\nIMR6XsqoKFx5KPZAo7p+4dT23JWYYvwT/gDSH2a6zGDCKJAe/7jJSH7hRuXq\nhCTc9xmi08/3CO4TW5AVqmMo3zddgu1rbZgrN1XW+KHrSaVxEiggUUl7DWy+\nyHMUS/mS+vNJlo0LFVn2EYQGQFFPmd1alJ+KexK3VNT0wMl1eDqCEX5E50iy\nKkN+unpXheAnIgGSa7awkYflSh+lL1yVYdLi4DTymUsN9d+J0PzLGB32MPWN\nxr+7eqVMdxZLOp/yfJeRh+NmbnknMdu5nrAQBTZ9CcaAMJIdAUPece3pBSAk\nEAFXUj3W3v1AYfs+ogaCMbM6aAds5knaJTsnXtV4lzd/+LooR8JkcVzQ2qvE\nqji51WsUdpLlyEsrMIpOtz9AvNgtwnqLw/2QeQlvcWMpt30iicRRUxDL/fP0\n+vL5\r\n=RfYJ\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=6"},"gitHead":"e5df4d4dce6faeed92ae834a072756db9e1b72b3","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/randoma.git","type":"git"},"_npmVersion":"6.4.1","description":"User-friendly pseudorandom number generator (PRNG)","directories":{},"_nodeVersion":"10.15.3","dependencies":{"color":"^3.1.1","park-miller":"^1.1.0","@types/color":"^3.0.0","@sindresorhus/string-hash":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2","@sindresorhus/is":"^0.15.0"},"_npmOperationalInternal":{"tmp":"tmp/randoma_1.3.0_1556077196124_0.07140630604447717","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"randoma","version":"2.0.0","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"randoma@2.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/randoma#readme","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"dist":{"shasum":"f4c8d08527109cddfccc5c2bb41b92208da36f79","tarball":"https://registry.npmjs.org/randoma/-/randoma-2.0.0.tgz","fileCount":5,"integrity":"sha512-AI6sCaCTWOYzWlaI78qdecxqZ/HvzPiw574S8QrM8naqBR/EA5la5sVJynypYOgRFTV8gPTha/uHcw/EBfdNIA==","signatures":[{"sig":"MEUCIQCu6H+WfVSVGUXXkOjfKnM79Jqs8Df4sHTHO0OMMHRaPQIgcEYWKHNwxoNamG621RKL4iMmYsA1ouQAxwhaYCyGaIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh237KCRA9TVsSAnZWagAAQcYP/3AyzuiIvkgwq51wY/IQ\nWPoUqPcrTeDbTnLk8orgKPaAXCj8eFq9eb/gM0do2qixVRGVu9EJDSEqm+1o\nIPLy3cPqQWYQLNhioxASGsgMKeSLY2+NAqqWWkDwUuid8ym4bgn0kKasHPW/\ngEZDOlk6TVzX1UocLrF6ubXRD7Cble7RkfN3JJ20C9yAqDZDbBIz+4mqZ/Ji\naKGQgGg5MxLPeJ2b9dXo2zy45d+dALwV+esXOhTBqqQWT8hXnUkwD4zBMuSH\n009KuNCW1p24KfRWZQjIw59RflgVsAq3AWhGV0s9KoJmoFNMp7pn0KjbP1pf\npp9EMTLEw6zVDKI8jFWT4d+/MTxduKXo4jGsb8H359DyHf9HpTun2hYHqAow\nKpGzRVuaxCset5aQ5BWZT1v9ZIVyG6u7RyMUBwr5auMzTU22Ls/qveBJXHZ9\n56/68Phy7vOHSd/gKNPHprivAa+ekwU+pcFyTJL0iVZX9OzNkm7hkulhdjhJ\njfQLKOW1xQic1Ixsgw6/CG8osIaJ+SNID8IclJOL0KWpfr2jvA/onNUf1ItE\nY/F9XP2Z5pu8OJJ4GbKfLn00BYdUms+IrQ8/7GCb0JleRgsSmmNTQKfSPH7M\nXtB27zX+HQIG/vWYOBPl4+jH+q4feccCaAcN+1o3D9EXbBEmYLGZhS7dpiBU\nS1ok\r\n=sARt\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"808789bb2d76781c2a15965a82e68fdef25e1088","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/randoma.git","type":"git"},"_npmVersion":"8.1.0","description":"User-friendly pseudorandom number generator (PRNG)","directories":{},"_nodeVersion":"12.22.1","dependencies":{"color":"^4.0.1","park-miller":"^2.0.0","@types/color":"^3.0.2","@sindresorhus/string-hash":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.46.4","ava":"^3.15.0","tsd":"^0.18.0","@sindresorhus/is":"^4.2.0"},"_npmOperationalInternal":{"tmp":"tmp/randoma_2.0.0_1636138983978_0.2090083086276917","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"randoma","version":"2.0.1","description":"User-friendly pseudorandom number generator (PRNG)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/randoma.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.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"//test":"xo && ava && tsd","test":"ava && tsd"},"keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"dependencies":{"@sindresorhus/string-hash":"^2.0.0","@types/color":"^3.0.2","color":"^4.0.1","park-miller":"^2.0.1"},"devDependencies":{"@sindresorhus/is":"^4.2.0","ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.46.4"},"_id":"randoma@2.0.1","gitHead":"79a017468e4fa45dc4e007c6d458fcf86ed37f75","bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"homepage":"https://github.com/sindresorhus/randoma#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-frgU9oaoqNoQrqKQTEWlNvXP8L+olWqBMGRUyMwxASNCaKQk6g9QS/bgwRmi/Aj0X96LSX7FKv2Q/x5ljSCC3A==","shasum":"b992a90b5225e0415d748c9b9683bec364bc865f","tarball":"https://registry.npmjs.org/randoma/-/randoma-2.0.1.tgz","fileCount":5,"unpackedSize":7034,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHD5xRBqMTH/CdQVlRqtBWjGt9FwcJiPUlDENtj0qqOwIhALFutx7ZDR9YkFZpMIGo8EEQklKxMX0vv2VqHNAUCUVb"}]},"_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/randoma_2.0.1_1757508036182_0.38217592757337004"},"_hasShrinkwrap":false}},"time":{"created":"2018-01-13T14:45:30.303Z","modified":"2025-09-10T12:40:36.522Z","1.0.0":"2018-01-13T14:45:30.303Z","1.1.0":"2018-01-23T12:36:31.556Z","1.2.0":"2018-03-06T07:36:13.540Z","1.3.0":"2019-04-24T03:39:56.261Z","2.0.0":"2021-11-05T19:03:04.114Z","2.0.1":"2025-09-10T12:40:36.357Z"},"bugs":{"url":"https://github.com/sindresorhus/randoma/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/randoma#readme","keywords":["pseudorandom","number","generator","algorithm","random","integer","int","float","boolean","date","seed","seeded","prng","rng"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/randoma.git"},"description":"User-friendly pseudorandom number generator (PRNG)","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# randoma\n\n> User-friendly [pseudorandom number generator (PRNG)](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)\n\nThis is not cryptographically secure.\n\n*“Pull request welcome” for additional commonly used random methods.*\n\n## Install\n\n```sh\nnpm install randoma\n```\n\n## Usage\n\n```js\nimport Randoma from 'randoma';\n\nconst random = new Randoma({seed: 10});\n\nrandom.integer();\n//=> 2027521326\n\nrandom.integer();\n//=> 677268843\n\n\n(new Randoma({seed: '🦄'}).integer());\n//=> 1659974344\n\n(new Randoma({seed: '🦄'}).integer());\n//=> 1659974344\n```\n\n## API\n\n### `const random = new Randoma(options)`\n\n#### options\n\nType: `object`\n\n##### seed\n\n*Required*\\\nType: `string | number`\n\n[Initialization seed.](https://en.m.wikipedia.org/wiki/Random_seed)\n\nMultiple instances of `Randoma` with the same seed will generate the same random numbers.\n\n#### random.integer()\n#### random.integerInRange(minimum, maximum)\n#### random.float()\n#### random.floatInRange(minimum, maximum)\n#### random.boolean()\n#### random.arrayItem(array)\n#### random.date()\n#### random.dateInRange(startDate, endDate)\n\n#### random.color(saturation?)\n\nReturns a random [aesthetically pleasing color](https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/) as a [`color`](https://github.com/Qix-/color) object.\n\n```js\nrandom.color(0.5).hex().toString()\n//=> '#AAF2B0'\n```\n\n##### saturation\n\nType: `number`\\\nDefault: `0.5`\n\nA percentage in the range `0...1`.\n\n### Randoma.seed()\n\nReturns a random seed you could use in the `seed` option if you for some reason don't want deterministic randomness.\n\n## Related\n\n- [park-miller](https://github.com/sindresorhus/park-miller) - Park-Miller pseudorandom number generator (PRNG)\n","readmeFilename":"readme.md"}