Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Games and state

namesListfunction

Names in a list: "Ann, Ben", or "Ann、Ben" in Japanese.

Import it

import { namesList } from "@johnmorrisdotca/toranpu";

Definition

function namesList(names: readonly string[], language?: Language): string

Parameters

NameTypeDescription
namesreadonly string[]

The player names in seat order.

language (optional)Language

English or Japanese for the displayed words.

Returns

string

Names in a list: "Ann, Ben", or "Ann、Ben" in Japanese.

Examples

import { namesList } from "@johnmorrisdotca/toranpu";

console.log(namesList(["Aki", "Ben", "Cy"], "en"));
Aki, Ben, Cy

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.