Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Rolls and exact odds

findPresetsfunction

The presets a search finds: every word typed has to be in the name, another name, the one-line description or the notation. An empty search finds them all.

Import it

import { findPresets } from "@johnmorrisdotca/korokoro";

Definition

function findPresets(search: string): Preset[]

Parameters

NameTypeDescription
searchstring

Text to match against preset ids, names and aliases.

Returns

Preset[]

The presets a search finds: every word typed has to be in the name, another name, the one-line description or the notation. An empty search finds them all.

Examples

import { findPresets } from "@johnmorrisdotca/korokoro";
console.log(findPresets("yahtzee").map((preset) => preset.id));
[ 'yahtzee' ]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.