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 · Marking, scores and game rules

unpackfunction

A packed kana list read into its words, size kana each.

Import it

import { unpack } from "@johnmorrisdotca/kotoba";

Definition

function unpack(packed: Packed, size: number): KanaWords

Parameters

NameTypeDescription
packedPacked

A packed kana list with alphabet, codes and release.

sizenumber

The number of letters or kana in each word.

Returns

KanaWords

A packed kana list read into its words, size kana each.

Examples

import { unpack } from "@johnmorrisdotca/kotoba";
import { JA_WORDS_3 } from "@johnmorrisdotca/kotoba/kana-3";

console.log(unpack(JA_WORDS_3,3).answers.length);
2000

What it prints (run when this page was built)

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