Reference · The whole entry of a word: every sense, and everything JMdict says of it
referenceOffunction
A cross-reference of a sense in its parts: JMdict writes one as the word, the reading and the number of the sense, apart by
"・", each of them optional (神, 神・かみ, 天神・6).
Import it
import { referenceOf } from "@johnmorrisdotca/jisho/entries";
Definition
function referenceOf(text: string): Reference
Parameters
| Name | Type | Description |
|---|---|---|
text | string | An item of a sense's |
Returns
Reference
The word to look up, its reading if it says one, and the sense number if it says one.
Examples
import { referenceOf } from "@johnmorrisdotca/jisho/entries";
console.log(referenceOf("天神・6")); // { written: "天神", reading: undefined, sense: 6 }
console.log(referenceOf("神・かみ・1").reading); // かみ{ written: '天神', reading: undefined, sense: 6 }
かみWhat it prints (run when this page was built)