Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brecert/seeded-numbers

generate psuedorandom numbers from a seed for Deno, Node, and the Browser
https://github.com/brecert/seeded-numbers

Last synced: 3 days ago
JSON representation

generate psuedorandom numbers from a seed for Deno, Node, and the Browser

Awesome Lists containing this project

README

        

# seeded-numbers

## Usage
```js
import { seededNumbers } from 'seeded-numbers';
// or
import { seededNumbers } from 'https://deno.land/x/seeded_numbers/mod.ts';

let numbers = seededNumbers(0xB733);
assert(numbers.next().value === 2121607608);
assert(numbers.next().value === 1429965843);

let values = seededNumbers(11113);
assert(values.next().value === 3358610980);
assert(values.next().value === 2581454588);
```