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
| Name | Type | Description |
|---|---|---|
text | string | 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"));nullWhat it prints (run when this page was built)