Reference · Radical intersection and display forms
withCorrectedStrokesfunction
The radicals with the two miscounts put right, as new entries in the same order. Hand it to everything that groups by strokes.
Import it
import { withCorrectedStrokes } from "@johnmorrisdotca/bushu";
Definition
function withCorrectedStrokes(radicals: readonly Radical[]): Radical[]
Parameters
| Name | Type | Description |
|---|---|---|
radicals | readonly Radical[] | The native radical entries; these inputs are read without mutation. |
Returns
Radical[]
The radicals with the two miscounts put right, as new entries in the same order. Hand it to everything that groups by strokes.
Examples
import { withCorrectedStrokes } from "@johnmorrisdotca/bushu";
console.log(withCorrectedStrokes([{radical:"乞",strokes:2,kanji:"乞"}])[0].strokes);3What it prints (run when this page was built)