seededSource関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
sfc32 started from a text seed: the same seed gives the same rolls on every platform, forever. Not for anything that must be unguessable.
インポート
import { seededSource } from "@johnmorrisdotca/korokoro";
定義
function seededSource(seed: string): RandomSource
引数
| 名前 | 型 | 説明 |
|---|---|---|
seed | string | Text that reproduces the same random sequence, or null for an unseeded stored roll. |
戻り値
RandomSource
sfc32 started from a text seed: the same seed gives the same rolls on every platform, forever. Not for anything that must be unguessable.
例
import { seededSource } from "@johnmorrisdotca/korokoro";
console.log(seededSource("table").next() === seededSource("table").next());true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。