Reference · Rolls and exact odds
cryptoSourcefunction
The platform's cryptographic generator, buffered so a roll of ten dice is one call.
Import it
import { cryptoSource } from "@johnmorrisdotca/korokoro";
Definition
function cryptoSource(provider?: CryptoLike | undefined): RandomSource
Parameters
| Name | Type | Description |
|---|---|---|
provider (optional) | CryptoLike | undefined | The cryptographic getRandomValues provider; the platform provider by default. |
Returns
RandomSource
The platform's cryptographic generator, buffered so a roll of ten dice is one call.
Examples
import { cryptoSource } from "@johnmorrisdotca/korokoro";
console.log(cryptoSource().seed);nullWhat it prints (run when this page was built)