seedrandom
Advanced tools
Comparing version 2.3.5 to 2.3.6
{ | ||
"name": "seedrandom", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"description": "Seeded random number generator for Javascript.", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
{ | ||
"name": "seedrandom", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"description": "Seeded random number generator for Javascript.", | ||
@@ -5,0 +5,0 @@ "main": "seedrandom.js", |
@@ -9,5 +9,5 @@ seedrandom.js | ||
version 2.3.5<br> | ||
version 2.3.6<br> | ||
Author: David Bau<br> | ||
Date: 2014 May 12 | ||
Date: 2014 May 14 | ||
@@ -21,5 +21,7 @@ Can be used as a plain script, a node.js module or an AMD module. | ||
<pre> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.5/seedrandom.min.js> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.6/seedrandom.min.js> | ||
</script> | ||
</pre> | ||
<pre> | ||
// Sets Math.random to a PRNG initialized using the given explicit seed. | ||
@@ -65,7 +67,7 @@ Math.seedrandom('hello.'); | ||
rng = seedrandom(); | ||
console.log(Math.random()); // Reasonably unpredictable. | ||
console.log(rng()); // Reasonably unpredictable. | ||
// Mixing accumulated entropy. | ||
rng = seedrandom('added entropy.', { entropy: true }); | ||
console.log(Math.random()); // As unpredictable as added entropy. | ||
console.log(rng()); // As unpredictable as added entropy. | ||
</pre> | ||
@@ -95,3 +97,3 @@ | ||
<pre> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.5/seedrandom.min.js> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.6/seedrandom.min.js> | ||
</script> | ||
@@ -145,5 +147,4 @@ <!-- Seeds using urandom bits from a server. --> | ||
* Version 2.3.1 adds a build environment, module packaging, and tests. | ||
* Version 2.3.3 fixes bugs on IE8, and switches to MIT license. | ||
* Version 2.3.4 fixes documentation to contain the MIT license. | ||
* Version 2.3.5 adds a readable options object argument. | ||
* Version 2.3.4 fixes bugs on IE8, and switches to MIT license. | ||
* Version 2.3.6 adds a readable options object argument. | ||
@@ -150,0 +151,0 @@ The standard ARC4 key scheduler cycles short keys, which means that |
@@ -8,5 +8,5 @@ /** | ||
version 2.3.5<br> | ||
version 2.3.6<br> | ||
Author: David Bau<br> | ||
Date: 2014 May 12 | ||
Date: 2014 May 14 | ||
@@ -18,3 +18,3 @@ Can be used as a plain script, a node.js module or an AMD module. | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.5/seedrandom.min.js> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.6/seedrandom.min.js> | ||
</script> | ||
@@ -52,2 +52,6 @@ | ||
// Autoseeded ARC4-based PRNG. | ||
rng = seedrandom(); | ||
console.log(rng()); // Reasonably unpredictable. | ||
// Global PRNG: set Math.random. | ||
@@ -57,9 +61,5 @@ seedrandom('hello.', { global: true }); | ||
// Autoseeded ARC4-based PRNG. | ||
rng = seedrandom(); | ||
console.log(Math.random()); // Reasonably unpredictable. | ||
// Mixing accumulated entropy. | ||
rng = seedrandom('added entropy.', { entropy: true }); | ||
console.log(Math.random()); // As unpredictable as added entropy. | ||
console.log(rng()); // As unpredictable as added entropy. | ||
@@ -83,3 +83,3 @@ | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.5/seedrandom.min.js> | ||
<script src=//cdnjs.cloudflare.com/ajax/libs/seedrandom/2.3.6/seedrandom.min.js> | ||
</script> | ||
@@ -128,5 +128,4 @@ <!-- Seeds using urandom bits from a server. --> | ||
* Version 2.3.1 adds a build environment, module packaging, and tests. | ||
* Version 2.3.3 fixes bugs on IE8, and switches to MIT license. | ||
* Version 2.3.4 fixes documentation to contain the MIT license. | ||
* Version 2.3.5 adds a readable options object argument. | ||
* Version 2.3.4 fixes bugs on IE8, and switches to MIT license. | ||
* Version 2.3.6 adds a readable options object argument. | ||
@@ -133,0 +132,0 @@ The standard ARC4 key scheduler cycles short keys, which means that |
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
203
192016
4391