Reference · Dice and card dressing
tenkaCardOfIdfunction
The map and territory an id of tenkaCardId names, or null for a wild card (wild: true) or anything else.
Import it
import { tenkaCardOfId } from "@johnmorrisdotca/tenka/dressing";
Definition
function tenkaCardOfId(id: string): { map: TenkaMapKey; territory: number; } | { wild: true; } | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A native Tenka card identifier. |
Returns
{ map: TenkaMapKey; territory: number; } | { wild: true; } | null
The map and territory for a native card id, a wild marker for a wild id, or null for an unknown id.
Examples
import { tenkaCardId, tenkaCardOfId } from "@johnmorrisdotca/tenka/dressing";
console.log(tenkaCardOfId(tenkaCardId("world",0)));{ map: 'world', territory: 0 }What it prints (run when this page was built)