Skip to the content

Kotoba言葉

Load only the word lists you need, mark repeated letters correctly and play a daily or seeded word game.

Kotoba is the Japanese word for words. About the name

Contents

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

NameTypeDescription
textstring

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 2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kotoba 1.2.0.