Reference · Marking, scores and game rules
readShiritoriWordsfunction
Reads the stored shiritori list into plain rows, commonest first.
Import it
import { readShiritoriWords } from "@johnmorrisdotca/kotoba";
Definition
function readShiritoriWords(packed: { readonly release: string; readonly rows: string; }): ShiritoriWord[]
Parameters
| Name | Type | Description |
|---|---|---|
packed | { readonly release: string; readonly rows: string; } |
|
Returns
ShiritoriWord[]
Every word, commonest first.
Examples
import { readShiritoriWords, shiritoriChoices } from "@johnmorrisdotca/kotoba";
import { JA_SHIRITORI } from "@johnmorrisdotca/kotoba/shiritori-ja";
console.log(shiritoriChoices(readShiritoriWords(JA_SHIRITORI), ["さくら"])[0]);{ reading: 'らいげつ', word: '来月', meaning: 'next month' }What it prints (run when this page was built)