リファレンス
部品の共通部分と表示形
import { … } from "@johnmorrisdotca/bushu";
最小化と gzip 圧縮をしたサイズは 0.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Bushu 部首, the radical lookup: find a kanji by the parts it is made of, with no page and no data needed.
kanjiForRadicalsandusableRadicals: the kanji that hold every chosen part, and the parts that can still narrow them (the dimming of a picker).radicalGroups,orderChosenandradicalsInKanji: the grid by stroke count, the choice in the grid's order, and the parts of one kanji.radicalFormandwithCorrectedStrokes: RADKFILE's stand-ins (汁 for 氵) turned back into the shapes people see, and its two wrong stroke counts put right.
The data is in /radkfile (the radicals), /names (さんずい, にんべん, くさかんむり) and /strokes (the strokes of a kanji), and the picker to put in a page in /picker.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
isRadicalStandIn | 関数 | True when the key is a stand-in, so that the form, not the key, is the thing to draw and to name. |
kanjiForRadicals | 関数 | The kanji that hold every one of the chosen radicals, in the order of the first radical's list (the dictionary's own). |
orderChosen | 関数 | The chosen radicals in the grid's own order, not the order they were clicked, so the choice reads as a row of the grid. |
Radical | 型 | A radical, or a common element of kanji, as RADKFILE lists it. |
RADICAL_FORMS | 定数 | WHAT A RADKFILE RADICAL LOOKS LIKE, AS OPPOSED TO WHAT IT IS KEYED BY. |
radicalForm | 関数 | The shape to draw for a RADKFILE key: the stand-in's own shape (汁 gives 氵), or the key itself where it already is the shape. |
RadicalGroup | 型 | The radicals that share a stroke count, as the grid of a picker draws them. |
radicalGroups | 関数 | The grid: the radicals in stroke-count order, grouped by the count, in the order they were given within a count. |
radicalsInKanji | 関数 | The radicals a character is written with, fewest strokes first. |
radicalStrokes | 関数 | The stroke count to file a RADKFILE radical under: its own, except for the two it miscounts. |
RADKFILE_STROKE_CORRECTIONS | 定数 | THE TWO STROKE COUNTS RADKFILE GETS WRONG. |
usableRadicals | 関数 | The radicals that can still narrow what is left: every one that appears in at least one of the kanji that match now. |
VERSION | 定数 | The package's version. |
withCorrectedStrokes | 関数 | The radicals with the two miscounts put right, as new entries in the same order. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。