Reference · Marking, scores and game rules
kotobaSayfunction
A string with its braces filled in from values; a brace with no value is left as it is.
Import it
import { kotobaSay } from "@johnmorrisdotca/kotoba";
Definition
function kotobaSay(text: string, values?: Readonly<Record<string, string | number>>): string
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The date text to validate, or localized template specified by the 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 { kotobaSay } from "@johnmorrisdotca/kotoba";
console.log(kotobaSay("Row {n}",{n:2}));Row 2What it prints (run when this page was built)