Reference · Rules, games and records
presetByNamefunction
The preset a site's printed name leads to, or undefined. Case and spacing around the name do not matter.
Import it
import { presetByName } from "@johnmorrisdotca/sugoroku";
Definition
function presetByName(name: string): Preset | undefined
Parameters
| Name | Type | Description |
|---|---|---|
name | string | The colour property, preset name or sound identifier specified by this signature. |
Returns
Preset | undefined
The matching preset, or undefined for an unknown name.
Examples
import { presetByName } from "@johnmorrisdotca/sugoroku";
console.log(presetByName("backgammon")?.key);backgammonWhat it prints (run when this page was built)