readRomaji関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What has been typed, as kana, and what is still being typed.
インポート
import { readRomaji } from "@johnmorrisdotca/kotoba";
定義
function readRomaji(typed: string): { kana: string[]; rest: string; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
typed | string | Romaji text to consume into kana and any unfinished suffix. |
戻り値
{ kana: string[]; rest: string; }
What has been typed, as kana, and what is still being typed.
例
import { readRomaji } from "@johnmorrisdotca/kotoba";
console.log(readRomaji("konnichiha"));{ kana: [ 'こ', 'ん', 'に', 'ち', 'は' ], rest: '' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。