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
| Name | Type | Description |
|---|---|---|
search | string | 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)