describeMedalTable関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The table as a sentence, the drawing's description.
インポート
import { describeMedalTable } from "@johnmorrisdotca/taisen-brackets";
定義
function describeMedalTable(source: MedalTableSource, options?: Pick<MedalTableOptions, "locale" | "words" | "sort" | "ties" | "top" | "skipEmpty">): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
source | MedalTableSource | The medal table. |
options (省略可) | Pick<MedalTableOptions, "locale" | "words" | "ties" | "sort" | "top" | "skipEmpty"> | The language, the words, the sort and the rows chosen. |
戻り値
string
The description.
例
import { describeMedalTable } from "@johnmorrisdotca/taisen-brackets";
console.log(describeMedalTable({ rows: [
{ name: "France", flag: "FR", gold: 6, silver: 1, bronze: 3 },
{ name: "Japan", flag: "JP", gold: 5, silver: 3, bronze: 2 },
] }));Medal table. 1, France, 6 gold, 1 silver, 3 bronze, 10 total. 2, Japan, 5 gold, 3 silver, 2 bronze, 10 total.出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。