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 · Tile and table elements

languageOffunction

The language an element speaks: its own lang, or the nearest one above it, or the page's; Japanese for anything that starts ja.

Import it

import { languageOf } from "@johnmorrisdotca/jarajara/element";

Definition

function languageOf(element: Element): TileLanguage

Parameters

NameTypeDescription
elementElement

The DOM element whose language is read.

Returns

TileLanguage

The language an element speaks: its own lang, or the nearest one above it, or the page's; Japanese for anything that starts ja.

Examples

import { languageOf } from "@johnmorrisdotca/jarajara/element";

const tile = document.createElement("div");
tile.lang = "ja";
console.log(languageOf(tile));

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