Reference · Tiles, Mexican Train and replay
dominoSayfunction
A string with its braces filled in from values; a brace with no value is left as it is.
Import it
import { dominoSay } from "@johnmorrisdotca/domino";
Definition
function dominoSay(text: string, values?: Readonly<Record<string, string | number>>): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The localized template, or saved-game text specified by this signature. |
values (optional) | Readonly<Record<string, string | number>> | Replacement strings or numbers for brace-delimited placeholders. |
Returns
string
A string with its braces filled in from values; a brace with no value is left as it is.
Examples
import { dominoSay } from "@johnmorrisdotca/domino";
console.log(dominoSay("Round {n}",{n:2}));Round 2What it prints (run when this page was built)