Skip to the content

Bushu部首

Choose the parts you can see in a kanji, intersect their matches, and add a radical picker to your page.

Bushu is the Japanese word 部首 for a kanji radical. About the name

Contents

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

NameTypeDescription
radicalsreadonly 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);
3

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/bushu 1.1.0.