Reference
The functions that read the tables
import { … } from "@johnmorrisdotca/jisho";
0.9 kB minified and gzipped, with everything it imports (measured with esbuild)
Jisho: Japanese kanji as data. The school grades, the JLPT levels, the readings and meanings and the pairs that look alike are each an entry point of their own, so a page loads only what it reads; this entry holds the types and the plain functions that read them, and no data.
Exports
| Name | Kind | What it is |
|---|---|---|
ELEMENTARY_GRADES | constant | The grades taught in Japanese elementary school: 1,026 kanji, the kyōiku kanji. |
gradeOf | function | Which grade a kanji is taught in. |
GradeTable | type | The shape of GRADES, from @johnmorrisdotca/jisho/grades. |
JLPT_LEVELS | constant | Every JLPT level, the easiest first. |
JlptLevel | type | A JLPT level, N5 the easiest. |
JlptTable | type | The shape of JLPT, from @johnmorrisdotca/jisho/jlpt. |
JOYO_GRADES | constant | The grades that make up the jōyō kanji, the 2,136 for everyday use. |
Kanji | type | One kanji in full. |
kanjiIn | function | The kanji in a piece of text, once each, in the order they first appear. |
kanjiOfGrade | function | The kanji of one grade. |
kanjiOfLevel | function | The kanji of one JLPT level, not counting the levels below it. |
levelOf | function | Which JLPT level's list holds a kanji. |
LookAlike | type | A kanji that looks like another, and how much. |
LookAlikeOptions | type | How far lookAlikes goes. |
lookAlikes | function | The kanji most like one kanji, the closest first. |
PackedKanji | type | The shape of KANJI, from @johnmorrisdotca/jisho/kanji. |
PackedLookAlikes | type | The shape of LOOK_ALIKE, from @johnmorrisdotca/jisho/look-alike. |
readKanji | function | Reads the stored table into plain rows. |
SCHOOL_GRADES | constant | Every school grade, in order. |
SchoolGrade | type | A school grade as KANJIDIC2 numbers it: 1 to 6 are elementary school, 8 is the rest of the jōyō kanji, taught in secondary school, 9 is the kanji allowed in names (jinmeiyō), 10 is a jinmeiyō variant of a jōyō kanji. |
searchKanji | function | The kanji that hold a piece of text: the character itself, a reading or a meaning, in English or French, ignoring case. |
VERSION | constant | The package's version. |