Reference · Kanji stroke counts
KANJI_STROKESconstant
THE STROKE COUNT OF EVERY KANJI IN THE RADICAL INDEX, from KANJIDIC2. Written by scripts/build-data.mjs, never edited by
hand; the monthly refresh (.github/workflows/radkfile-refresh.yml) runs the script again.
KANJIDIC2 is the property of the Electronic Dictionary Research and Development Group (EDRDG), used under the Creative Commons Attribution-ShareAlike 4.0 licence and the Group's conditions: https://www.edrdg.org/edrdg/licence.html. This data is derived from it and is under the same licence (see NOTICE.md).
6355 kanji, grouped by their stroke count so that a count is one string; where KANJIDIC2 lists more than one count for a kanji, this is the first, the accepted one.
Import it
import { KANJI_STROKES } from "@johnmorrisdotca/bushu/strokes";
Definition
const KANJI_STROKES: { source: { name: string; url: string; fileVersion: string | null; databaseVersion: string | null; fileDate: string | null; sha256: string; retrieved: string; }; byStrokes: Readonly<Record<string, string>>; }
Members
| Name | Type | Description |
|---|---|---|
source | { name: string; url: string; fileVersion: string | null; databaseVersion: string | null; fileDate: string | null; sha256: string; retrieved: string; } | What this was made from: the file's address, SHA-256 (of the file as served, gzipped), the date this was made, and what the file says of itself. |
byStrokes | Readonly<Record<string, string>> | Stroke count to the kanji with that many, in code point order. |
Examples
import { KANJI_STROKES } from "@johnmorrisdotca/bushu/strokes";
console.log(Object.keys(KANJI_STROKES.byStrokes).length);30What it prints (run when this page was built)