本文へ移動

Taisen Brackets対戦

対戦の一覧から、トーナメント表をSVGで描きます。

対戦(たいせん)は、二者が向かい合って勝負することです。 名前について(英語)

目次

リファレンス · 各対戦の位置を計算

Voice型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A language ready to write with: the words with any replacements, and the formats.

インポート

import type { Voice } from "@johnmorrisdotca/taisen-brackets/layout";

ほかのエクスポート元: @johnmorrisdotca/taisen-brackets

定義

interface Voice {
    locale: Locale;
    words: Words;
    number(n: number): string;
    date(iso: string): string | null;
    upper(text: string): string;
    round(name: string): string;
    team(team: Team): string;
}

メンバー

名前型説明
localeLocale
wordsWords
number(n: number): string

A number in the language's own digits and separators.

date(iso: string): string | null

A date as the language writes it ("Dec 18, 2022", "2022/12/18"), or null when iso does not start with a date.

upper(text: string): string

Capitals, by the language's own rules (not for Japanese).

round(name: string): string

A round's name in the language.

team(team: Team): string

A team's name in the language.

例

import { voiceOf, type Voice } from "@johnmorrisdotca/taisen-brackets";

const voice: Voice = voiceOf({ locale: "fr" });
console.log(voice.upper("finale"));
FINALE

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/taisen-brackets 0.20.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。