cardNamefunction
"queen of hearts": the name a screen reader says.
Import it
import { cardName } from "@johnmorrisdotca/toranpu/deck";
Definition
function cardName(card: Card): string
Parameters
| Name | Type | Description |
|---|---|---|
card | Card | The physical card or card id to read, draw or play. |
Returns
string
"queen of hearts": the name a screen reader says.
Examples
import { cardName } from "@johnmorrisdotca/toranpu/deck";
const card = { suit: "spades", rank: 1 } as const;
console.log(cardName(card));ace of spadesWhat it prints (run when this page was built)