cardOfIdfunction
The deck's card for an id, for the deck's components to draw.
Import it
import { cardOfId } from "@johnmorrisdotca/toranpu";
Definition
function cardOfId(card: CardId): Card
Parameters
| Name | Type | Description |
|---|---|---|
card | string | The physical card or card id to read, draw or play. |
Returns
Card
The deck's card for an id, for the deck's components to draw.
Examples
import { cardOfId } from "@johnmorrisdotca/toranpu";
console.log(cardOfId("AS"));{ suit: 'spades', rank: 1 }What it prints (run when this page was built)