usableRadicals関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The radicals that can still narrow what is left: every one that appears in at least one of the kanji that match now.
A radical in none of the remaining kanji is a dead end, which a picker dims rather than let you click your way to an empty list. The chosen ones stay in the set: taking one back must always be possible. With nothing chosen, every radical can.
インポート
import { usableRadicals } from "@johnmorrisdotca/bushu";
定義
function usableRadicals(radicals: readonly Radical[], chosen: readonly string[]): Set<string>
引数
| 名前 | 型 | 説明 |
|---|---|---|
radicals | readonly Radical[] | The native radical entries; these inputs are read without mutation. |
chosen | readonly string[] | Chosen RADKFILE keys, interpreted as an intersection of all chosen parts. |
戻り値
Set<string>
The radicals that can still narrow what is left: every one that appears in at least one of the kanji that match now.
例
import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { usableRadicals } from "@johnmorrisdotca/bushu";
const radicals = RADKFILE.radicals;
console.log(usableRadicals(radicals,["汁","田"]).has("汁"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。