Reference · Tiles, layouts and deals
faceOffunction
The face a letter stands for, or null for anything that is not one.
Import it
import { faceOf } from "@johnmorrisdotca/jarajara";
Definition
function faceOf(code: string): MahjongFace | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | The one-character face code or tile identifier. |
Returns
MahjongFace | null
The face a letter stands for, or null for anything that is not one.
Examples
import { faceOf } from "@johnmorrisdotca/jarajara";
console.log(faceOf("a"));{ code: 'a', suit: 'characters', rank: 1 }What it prints (run when this page was built)