Skip to the content

Dominoドミノ

Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.

Domino is the Japanese borrowed word ドミノ for dominoes. About the name

Contents

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

NameTypeDescription
textstring

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 2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/domino 1.1.4.