Comparing version 2.0.0-rc2 to 2.0.0-rc3
@@ -0,1 +1,5 @@ | ||
# 2.0.0-rc3 (2019-03-10) | ||
- Provide a binding for `try`-`catch` to help parsing issues [#30](https://github.com/ckknight/random-js/issues/30) | ||
# 2.0.0-rc2 (2019-02-20) | ||
@@ -2,0 +6,0 @@ |
@@ -470,3 +470,3 @@ (function (global, factory) { | ||
} | ||
catch (_a) { | ||
catch (_) { | ||
// nothing to do here | ||
@@ -686,3 +686,3 @@ } | ||
} | ||
catch (_a) { | ||
catch (_) { | ||
// nothing to do here | ||
@@ -689,0 +689,0 @@ } |
{ | ||
"name": "random-js", | ||
"description": "A mathematically correct random number generator library for JavaScript.", | ||
"version": "2.0.0-rc2", | ||
"version": "2.0.0-rc3", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Cameron Kenneth Knight", |
# Random.js | ||
[![Build Status](https://travis-ci.org/ckknight/random-js.svg?branch=master)](https://travis-ci.org/ckknight/random-js) | ||
This is designed to be a mathematically correct random number generator library for JavaScript. | ||
@@ -7,2 +9,5 @@ | ||
## Upgrading from 1.0 | ||
Upgrading from 1.0 to 2.0 is a major, breaking change. For the most part, the way exports are defined is different. Instead of everything being available as static properties on a class-like function, random-js 2.0 exports each binding in accordance with current ECMAScript standards. | ||
## Why is this needed? | ||
@@ -83,2 +88,14 @@ | ||
If you wish to know the initial seed of `MersenneTwister19937.autoSeed()`, it is recommended to use the `createEntropy()` function to create the seed manually (this is what `autoSeed` does under-the-hood). | ||
```js | ||
const seed = createEntropy(); | ||
const mt = MersenneTwister19937.seedWithArray(seed); | ||
useTwisterALot(mt); // you'll have to implement this yourself | ||
const clone = MersenneTwister19937.seedWithArray(seed).discard( | ||
mt.getUseCount() | ||
); | ||
// at this point, `mt` and `clone` will produce equivalent values | ||
``` | ||
### Distributions | ||
@@ -85,0 +102,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106020
338