Reference · Marking, scores and game rules
readWordListsfunction
One length of a list read into words, or null for a length the list does not have.
Import it
import { readWordLists } from "@johnmorrisdotca/kotoba";
Definition
function readWordLists(data: WordData, size: number): WordLists | null
Parameters
| Name | Type | Description |
|---|---|---|
data | WordData | The packed dictionary groups keyed by word length. |
size | number | The number of letters or kana in each word. |
Returns
WordLists | null
One length of a list read into words, or null for a length the list does not have.
Examples
import { readWordLists } from "@johnmorrisdotca/kotoba";
import { EN_WORDS } from "@johnmorrisdotca/kotoba/words-en";
console.log(readWordLists(EN_WORDS,5)?.answers.length);2036What it prints (run when this page was built)