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

cleanTrainNamefunction

A seat's name as given, its spaces tidied and cut to TRAIN_NAME_MOST characters.

Import it

import { cleanTrainName } from "@johnmorrisdotca/domino";

Definition

function cleanTrainName(name: string): string

Parameters

NameTypeDescription
namestring

The player name to tidy and truncate.

Returns

string

A seat's name as given, its spaces tidied and cut to TRAIN_NAME_MOST characters.

Examples

import { cleanTrainName } from "@johnmorrisdotca/domino";

console.log(cleanTrainName("  A   B  "));
A B

What it prints (run when this page was built)

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