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 · Kanji stroke counts

sortByStrokesfunction

The kanji with the fewest strokes first; kanji with the same count keep the order they were given in, and a character with no count goes last. A new array: what was given is not changed.

Import it

import { sortByStrokes } from "@johnmorrisdotca/bushu/strokes";

Definition

function sortByStrokes(kanji: readonly string[]): string[]

Parameters

NameTypeDescription
kanjireadonly string[]

The kanji to look up, or the supplied kanji list where the signature requires an array.

Returns

string[]

The kanji with the fewest strokes first; kanji with the same count keep the order they were given in, and a character with no count goes last. A new array: what was given is not changed.

Examples

import { sortByStrokes } from "@johnmorrisdotca/bushu/strokes";

console.log(sortByStrokes(["海","一","水"]));
[ '一', '水', '海' ]

What it prints (run when this page was built)

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