Reference · Example sentences of a word, with furigana and their credit
furiganaOfExamplefunction
A sentence stored with its furigana marked |kanji《かな》 as pieces: the text and the kana over the kanji.
Import it
import { furiganaOfExample } from "@johnmorrisdotca/jisho/examples";
Definition
function furiganaOfExample(text: string): FuriganaPart[]
Parameters
| Name | Type | Description |
|---|---|---|
text | string | A sentence as the data stores it. |
Returns
FuriganaPart[]
The pieces, which put together are the sentence; the whole sentence in one piece when it has no furigana.
Examples
import { furiganaOfExample } from "@johnmorrisdotca/jisho/examples";
console.log(furiganaOfExample("|私《わたし》は|走《はし》る")); // [{ text: "私", reading: "わたし" }, { text: "は" }, ...][
{ text: '私', reading: 'わたし' },
{ text: 'は' },
{ text: '走', reading: 'はし' },
{ text: 'る' }
]What it prints (run when this page was built)