Skip to the content

Kotoba言葉

Load only the word lists you need, mark repeated letters correctly and play a daily or seeded word game.

Kotoba is the Japanese word for words. About the name

Contents

Reference · Game element

defineGamefunction

Defines the default game or a subclass under a custom tag. Safe on a server.

Import it

import { defineGame } from "@johnmorrisdotca/kotoba/element";

Also exported from: @johnmorrisdotca/kotoba/element/define

Definition

function defineGame(tagName?: string, registry?: CustomElementRegistry | undefined): void

Parameters

NameTypeDescription
tagName (optional)string

The custom tag name; omitted to use the package default.

registry (optional)CustomElementRegistry | undefined

The custom-element registry; omitted outside a browser.

Examples

import { defineGame } from "@johnmorrisdotca/kotoba/element";
defineGame();
console.log(typeof defineGame); // function
function

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kotoba 1.2.0.