Reference · Radical intersection and display forms
radicalGroupsfunction
The grid: the radicals in stroke-count order, grouped by the count, in the order they were given within a count.
Import it
import { radicalGroups } from "@johnmorrisdotca/bushu";
Definition
function radicalGroups(radicals: readonly Radical[]): RadicalGroup[]
Parameters
| Name | Type | Description |
|---|---|---|
radicals | readonly Radical[] | The native radical entries; these inputs are read without mutation. |
Returns
RadicalGroup[]
The grid: the radicals in stroke-count order, grouped by the count, in the order they were given within a count.
Examples
import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { radicalGroups } from "@johnmorrisdotca/bushu";
const radicals = RADKFILE.radicals;
console.log(radicalGroups(radicals).slice(0,2).map(group=>[group.strokes,group.radicals.length]));[ [ 1, 6 ], [ 2, 31 ] ]What it prints (run when this page was built)