MixShown型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A whole set, in its own order (a to z, あ to ん), with what a reader needs to see how uneven it is.
インポート
import type { MixShown } from "@johnmorrisdotca/kumimoji";
定義
type MixShown = {
tiles: MixTile[];
total: number;
most: number;
fewest: number;
rarest: string[];
commonest: string[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
tiles | MixTile[] | |
total | number | |
most | number | The most of any one tile, which the bars are drawn against. |
fewest | number | The fewest of any one tile, and the tiles with only that many: the hard ones. |
rarest | string[] | |
commonest | string[] | The tiles with the most, the ones a hand is full of. |
例
import type { MixShown } from "@johnmorrisdotca/kumimoji";
import { mixShown } from "@johnmorrisdotca/kumimoji";
import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";
await loadTileWordsFromModule("english");
const value: MixShown = mixShown("english");
console.log(value);{
tiles: [
{ code: 'a', glyph: 'a', forms: '', count: 13 },
{ code: 'b', glyph: 'b', forms: '', count: 3 },
{ code: 'c', glyph: 'c', forms: '', count: 3 },
{ code: 'd', glyph: 'd', forms: '', count: 6 },
{ code: 'e', glyph: 'e', forms: '', count: 18 },
{ code: 'f', glyph: 'f', forms: '', count: 3 },
{ code: 'g', glyph: 'g', forms: '', count: 4 },
{ code: 'h', glyph: 'h', forms: '', count: 3 },
{ code: 'i', glyph: 'i', forms: '', count: 12 },
{ code: 'j', glyph: 'j', forms: '', count: 2 },
{ code: 'k', glyph: 'k', forms: '', count: 2 },
{ code: 'l', glyph: 'l', forms: '', count: 5 },
{ code: 'm', glyph: 'm', forms: '', count: 3 },
{ code: 'n', glyph: 'n', forms: '', count: 8 },
{ code: 'o', glyph: 'o', forms: '', count: 11 },
{ code: 'p', glyph: 'p', forms: '', count: 3 },
{ code: 'q', glyph: 'q', forms: '', count: 2 },
{ code: 'r', glyph: 'r', forms: '', count: 9 },
{ code: 's', glyph: 's', forms: '', count: 6 },
{ code: 't', glyph: 't', forms: '', count: 9 },
{ code: 'u', glyph: 'u', forms: '', count: 6 },
{ code: 'v', glyph: 'v', forms: '', count: 3 },
{ code: 'w', glyph: 'w', forms: '', count: 3 },
{ code: 'x', glyph: 'x', forms: '', count: 2 },
{ code: 'y', glyph: 'y', forms: '', count: 3 },
{ code: 'z', glyph: 'z', forms: '', count: 2 }
],
total: 144,
most: 18,
fewest: 2,
rarest: [ 'j', 'k', 'q', 'x', 'z' ],
commonest: [ 'e' ]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。