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

writeCardsfunction

A run of cards as a string, one character each.

Import it

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

Definition

function writeCards(cards: readonly Card[]): string

Parameters

NameTypeDescription
cardsreadonly Card[]

The cards in their current order.

Returns

string

A run of cards as a string, one character each.

Examples

import { freshDeck, writeCards } from "@johnmorrisdotca/toranpu/deck";

console.log(writeCards(freshDeck().slice(0, 5)));
ABCDE

What it prints (run when this page was built)

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