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
| Name | Type | Description |
|---|---|---|
typed | string | 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)