- Changed
dist/outputs:random-js.js=>random-js.umd.jsrandom-js.mjs=>random-js.esm.jsrandom-js.min.js=>random-js.umd.min.js
- Release 2.0.0 (no code changes from 2.0.0-rc5)
- Add sourcemaps
- Improve minified bundle size
- Add
"sideEffects": falsetopackage.jsonas a hint to Webpack
- Provide a binding for
try-catchto help parsing issues #30
- Added
nodeCryptoengine - Exposed
createEntropyfunction, which can be used when seeding a Mersenne Twister - Changed
browserCryptoto no longer benullif outside of a browser context, insteadthrowing on first use.
- Converted to TypeScript, with type definitions available.
- Using ESNext-style modules (though still available as UMD)
- Changed exports so that they are not available on the
Randomclass, but instead in a flat hierarchy. - Switched from jasmine to jest
- Using rollup to package the build
- Changed .travis.yml node versions
- add
getUseCount()to themt19937engine, which returns how many requests or discards have occurred.
- the current time is now used in
Random.generateEntropyArray
- removed the optionalDependencies in package.json "benchmark" and "microtime".
sample()results are no longer biased toward the final element.discard(count)on themt19937engine properly works when count is less than 625- Clarify that the built-in engines return signed 32-bit integers (not unsigned).
string('')now throws an errorhex(upper)now returns a cached function, for efficiency.- add
int32(), which returns an integer from-0x80000000to0x7fffffff. - performance enhancements
- add benchmark suite, covers engines, integer, bool, and real.
- add
date(start, end), which returns a Date within a uniform distribution.
Randomno longer needs to be called with new, allowingvar r = require('random-js')()- Add
beginandendarguments topickandpicker.
- Even if
shufflereceives an empty array, it should return that same array.
- Fix
sampleandshufflewhen they are passed an empty array. - Include
-c(compress) option when uglifying.
Initial release