sortByStrokes関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { sortByStrokes } from "@johnmorrisdotca/bushu/strokes";
定義
function sortByStrokes(kanji: readonly string[]): string[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
kanji | readonly string[] | The kanji to look up, or the supplied kanji list where the signature requires an array. |
戻り値
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.
例
import { sortByStrokes } from "@johnmorrisdotca/bushu/strokes";
console.log(sortByStrokes(["海","一","水"]));[ '一', '水', '海' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。