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 · Load dictionaries

loadWordListfunction

One list of one size read into words, or null for a size the language has no list of.

Import it

import { loadWordList } from "@johnmorrisdotca/kotoba/load";

Definition

function loadWordList(name: WordListName, size: number): Promise<LoadedWordList | null>

Parameters

NameTypeDescription
nameWordListName

The supported dictionary language identifier.

sizenumber

The number of letters or kana in each word.

Returns

Promise<LoadedWordList | null>

One list of one size read into words, or null for a size the language has no list of.

Examples

import { loadWordList } from "@johnmorrisdotca/kotoba/load";

console.log((await loadWordList("en",5))?.answers.length);
2036

What it prints (run when this page was built)

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