Chance is a minimalist generator of random [1] strings, numbers, etc. to help reduce some monotony particularly while writing automated tests or anywhere else you need anything random.

Chance is open source software and is released under the developer and business-friendly MIT License

Chance is loaded on this site so you can just open the console on your browser and play!

Tweet

Written by Victor Quinn

Or move on to the Usage section for many other ways to get and use Chance.

Acknowledgements & Thanks

Thank you to Sean McCullough for your Mersenne Twister gist on which almost the entirety of this library is dependent. And to Takuji Nishimura and Makoto Matsumoto who wrote the original C version on which Sean's JavaScript gist is based.

And of course a monster thank you to all of the Contributors to this project!

© 2013 Victor Quinn Chance and this documentation are released under the terms of the MIT license.

[1] Of course true mathematicians out there would say that this ought to be considered as only generating pseudo-random things, not true random. For that we'd need some external entropy, not depending on a Mersenne Twister, blah, blah, blah. However, for most practical uses of this library for which it was created and intended, such as generating random names and addresses for automated tests, our random is good enough. But it should probably NOT be used for any cryptographic applications requiring true-random. See Wikipedia's article for more info.