Reference · Stroke order from KanjiVG: draw it, and find a kanji by drawing it
strokesOffunction
The strokes of a kanji in the order they are written, each as an SVG path.
Import it
import { strokesOf } from "@johnmorrisdotca/jisho/strokes";
Definition
function strokesOf(table: PackedStrokes, kanji: string): readonly string[]
Parameters
| Name | Type | Description |
|---|---|---|
table | PackedStrokes | What |
kanji | string | One kanji. |
Returns
readonly string[]
The paths, one for each stroke; none for a kanji the table has no strokes for.
Examples
import { loadStrokes, strokesOf } from "@johnmorrisdotca/jisho/strokes";
console.log(strokesOf(await loadStrokes("日"), "日").length); // 44What it prints (run when this page was built)