Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Browser table and SVG

tenkaSayfunction

A line from a table of strings with its braces filled in: tenkaSay(strings.moveIn, { n: 3 }) is "Move 3 in". A brace with no value is left as it is.

Import it

import { tenkaSay } from "@johnmorrisdotca/tenka/ui";

Also exported from: @johnmorrisdotca/tenka

Definition

function tenkaSay(line: string, values?: Readonly<Record<string, string | number>>): string

Parameters

NameTypeDescription
linestring

Text with named replacement braces.

values (optional)Readonly<Record<string, string | number>>

Replacement text or numbers keyed by brace name.

Returns

string

A line from a table of strings with its braces filled in: tenkaSay(strings.moveIn, { n: 3 }) is "Move 3 in". A brace with no value is left as it is.

Examples

import { tenkaSay } from "@johnmorrisdotca/tenka/ui";

console.log(tenkaSay("Seat {seat}",{seat:2}));
Seat 2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.