Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

random-js

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-js - npm Package Compare versions

Comparing version 2.0.0-rc2 to 2.0.0-rc3

4

CHANGELOG.md

@@ -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 @@

4

dist/random-js.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc