New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seeded-random-engine

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seeded-random-engine - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

3

index.d.ts

@@ -19,6 +19,5 @@ export = SeededRandomEngine;

history: number[][];
memory: number;
ff(generation?: number): void;
to(generation?: number): void;
generate(): void;
values(): number[];
}
{
"name": "seeded-random-engine",
"version": "1.0.3",
"version": "1.0.4",
"main": "index.mjs",

@@ -5,0 +5,0 @@ "repository": "https://github.com/jakealbaugh/seeded-random-engine",

@@ -26,4 +26,4 @@ # Seeded Random Engine

// Fast forward the engine to generation 57
engine.ff(57);
// Change the engine generation to 57
engine.to(57);
// Any engine sharing this seed and set to generation 57 will always yield the same values.

@@ -45,4 +45,2 @@ console.log(engine.values());

A seeded RNG can also be "fast forwarded." This means if a new device wants to join others, the others share the seed and the current "generation" (how many times the engine has been used), and the new device can catch up.
The core use case for this engine is one where human beings can do that sync easily together. I can tell my friend "enter seed 'willie' and we are at generation 100." With two small inputs, my friend can sync their device with everyone else and be looking at the exact same randomized data.

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