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

rankNamefunction

A rank as a sentence names one card of it: "queen", "seven"; in Japanese "クイーン", "7".

Import it

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

Definition

function rankName(rank: CardRank, language?: Language): string

Parameters

NameTypeDescription
rankRank

The card rank to inspect or name.

language (optional)Language

English or Japanese for the displayed words.

Returns

string

A rank as a sentence names one card of it: "queen", "seven"; in Japanese "クイーン", "7".

Examples

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

console.log(rankName(1, "en"));
ace

What it prints (run when this page was built)

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