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

kanjiForRadicalsfunction

The kanji that hold every one of the chosen radicals, in the order of the first radical's list (the dictionary's own).

Nothing chosen means nothing to show: the whole dictionary is not an answer to a question nobody has asked yet. A radical that is not in the list cannot be satisfied, so the answer is nothing.

Import it

import { kanjiForRadicals } from "@johnmorrisdotca/bushu";

Definition

function kanjiForRadicals(radicals: readonly Radical[], chosen: readonly string[]): string[]

Parameters

NameTypeDescription
radicalsreadonly Radical[]

The native radical entries; these inputs are read without mutation.

chosenreadonly string[]

Chosen RADKFILE keys, interpreted as an intersection of all chosen parts.

Returns

string[]

The kanji that hold every one of the chosen radicals, in the order of the first radical's list (the dictionary's own).

Examples

import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { kanjiForRadicals } from "@johnmorrisdotca/bushu";

const radicals = RADKFILE.radicals;
console.log(kanjiForRadicals(radicals,["汁","田"]).slice(0,5));
[ '演', '浬', '漁', '滝', '薄' ]

What it prints (run when this page was built)

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