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

suitNamefunction

A suit's name: "spades", or "スペード" in Japanese.

Import it

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

Definition

function suitName(suit: CardSuit, language?: Language): string

Parameters

NameTypeDescription
suitCardSuit

The card suit to compare or name.

language (optional)Language

English or Japanese for the displayed words.

Returns

string

A suit's name: "spades", or "スペード" in Japanese.

Examples

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

console.log(suitName("S", "en"));
spades

What it prints (run when this page was built)

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