UNPKG

3.02 kBMarkdownView Raw
1# ![Chance](./logo.png)
2
3**Chance** is a minimalist generator of random <a href="#true-random">[1]</a>
4strings, numbers, etc. to help reduce some monotony particularly while writing
5automated tests or anywhere else you need anything random.
6
7**Chance** is open source software and is released under the developer and
8business-friendly [MIT License](http://en.wikipedia.org/wiki/MIT_License)
9
10**Chance** is loaded on this site so you can just open the console on your
11browser and play!
12
13![Chance Web Inspector](./inspector.png)
14
15<a class="twitter-share-button"
16 href="https://twitter.com/share"
17 data-size="large"
18 data-text="Chance - Utility library to generate random things for JavaScript"
19 data-hashtags="chancejs,javascript"
20 data-url="http://chancejs.com/"
21 data-count="horizontal"
22 data-via="victorquinn">
23 Tweet
24</a>
25
26<iframe src="https://ghbtns.com/github-btn.html?user=chancejs&repo=chancejs&type=star&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe>
27
28Written by [Victor Quinn](https://www.victorquinn.com)
29
30[![Chance on NPM](https://nodei.co/npm/chance.png?downloads=true)](https://nodei.co/npm/chance/)
31
32<ul class=downloads>
33 <li>
34 <a href="chance.js" class="download" download="chance.js">chance.js (for development)</a>
35 - <i>95KB uncompressed</i>
36 </li>
37 <li>
38 <a href="chance.min.js" class="download">chance.min.js (for production)</a>
39 – <i>55KB, 17KB when gzipped</i>
40 </li>
41 </ul>
42
43Or move on to the [Usage](usage/bower.md) section for many other ways to get and use Chance.
44
45## Acknowledgements & Thanks
46
47Thank you to [Sean McCullough](https://github.com/banksean) for your [Mersenne Twister gist](https://gist.github.com/banksean/300494) 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.
48
49And of course a monster thank you to all of the [Contributors](https://github.com/chancejs/chancejs/graphs/contributors) to this project!
50
51<small>© 2013 [Victor Quinn](https://www.victorquinn.com)
52Chance and this documentation are released under the terms of the [MIT license](http://opensource.org/licenses/MIT).</small>
53
54<a id="true-random">[1]</a> 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](http://vq.io/12hBd84) for more info.
55
56<a href="https://www.gosquared.com/analytics/?utm_campaign=badge"><img src="https://stats.gs/badge" alt="Analytics by GoSquared" /></a>
\No newline at end of file