Reference · Rules, tiles and records
tileWordsfunction
The list already loaded, for judging and dealing. Throws where loadTileWords has not yet fetched it: a check that cannot read the list must not answer.
Import it
import { tileWords } from "@johnmorrisdotca/kumimoji";
Definition
function tileWords(language?: KumimojiLanguage): TileWords
Parameters
| Name | Type | Description |
|---|---|---|
language (optional) | KumimojiLanguage | The English or Japanese tile language. |
Returns
TileWords
The list already loaded, for judging and dealing. Throws where loadTileWords has not yet fetched it: a check that cannot read the list must not answer.
Examples
import { tileWords } from "@johnmorrisdotca/kumimoji";
import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";
await loadTileWordsFromModule("english");
console.log(tileWords("english").allowed.has("cat"));trueWhat it prints (run when this page was built)