Skip to the content

Sugoroku双六

Play backgammon and its relatives with native rules, cube and match scoring, seeded dice and replayable records.

Sugoroku is the Japanese name 双六 for games of tables. About the name

Contents

Reference · Playable board

sugorokuLanguageOffunction

The language an element or its page is in: its own lang, or the nearest above, and English unless that begins with ja.

Import it

import { sugorokuLanguageOf } from "@johnmorrisdotca/sugoroku/play";

Definition

function sugorokuLanguageOf(element: Element | null): SugorokuLanguage

Parameters

NameTypeDescription
elementElement | null

The host element whose inherited language is read; null selects the fallback.

Returns

SugorokuLanguage

The language an element or its page is in: its own lang, or the nearest above, and English unless that begins with ja.

Examples

import { sugorokuLanguageOf } from "@johnmorrisdotca/sugoroku/play";

const host = document.createElement("div");
host.lang="ja";
console.log(sugorokuLanguageOf(host));

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/sugoroku 1.1.1.