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 · Deck tools

readCardsfunction

A string of card characters read back, or null if any character names no card.

Import it

import { readCards } from "@johnmorrisdotca/toranpu/deck";

Definition

function readCards(text: string): Card[] | null

Parameters

NameTypeDescription
textstring

The notation, encoded state or saved text to read.

Returns

Card[] | null

A string of card characters read back, or null if any character names no card.

Examples

import { readCards } from "@johnmorrisdotca/toranpu/deck";

console.log(readCards("AS KH TD"));
null

What it prints (run when this page was built)

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