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 · Card designs

isCardFacefunction

Whether a text is a card a face can be drawn for: QS, TD, a joker (RJ, BJ), a rules card (R1, R2) or the blank (BL).

Import it

import { isCardFace } from "@johnmorrisdotca/toranpu/card-faces";

Definition

function isCardFace(text: unknown): text is string

Parameters

NameTypeDescription
textunknown

The notation, encoded state or saved text to read.

Returns

boolean

Whether a text is a card a face can be drawn for: QS, TD, a joker (RJ, BJ), a rules card (R1, R2) or the blank (BL).

Examples

import { isCardFace } from "@johnmorrisdotca/toranpu/card-faces";

console.log(isCardFace("AS"));
true

What it prints (run when this page was built)

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