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

finishRomajifunction

At Enter: what was typed, with a last "n" read as ん and any other unfinished sound dropped.

Import it

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

Definition

function finishRomaji(typed: string): string[]

Parameters

NameTypeDescription
typedstring

Romaji text to consume into kana and any unfinished suffix.

Returns

string[]

At Enter: what was typed, with a last "n" read as ん and any other unfinished sound dropped.

Examples

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

console.log(finishRomaji("pan"));
[ 'ぱ', 'ん' ]

What it prints (run when this page was built)

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