Skip to the content

Jarajaraジャラジャラ

Draw mahjong tiles, arrange racks and stacked boards, and play seeded Awase alone or at a shared table.

Jarajara is the Japanese sound of mahjong tiles rattling together. About the name

Contents

Reference · Tiles, layouts and deals

findFacesfunction

Every tile a text names: the one face findFace finds, or, for the name of a group (winds, honours, circles), all of its faces.

Import it

import { findFaces } from "@johnmorrisdotca/jarajara";

Definition

function findFaces(text: string): MahjongFace[]

Parameters

NameTypeDescription
textstring

The unknown text or encoded record to interpret.

Returns

MahjongFace[]

Every tile a text names: the one face findFace finds, or, for the name of a group (winds, honours, circles), all of its faces.

Examples

import { findFaces } from "@johnmorrisdotca/jarajara";

console.log(findFaces("dragons"));
[
  { code: 'F', suit: 'dragons', rank: 1 },
  { code: 'G', suit: 'dragons', rank: 2 },
  { code: 'H', suit: 'dragons', rank: 3 }
]

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jarajara 1.7.0.