本文へ移動

Taisen Brackets対戦

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

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

目次

リファレンス · リーグごとの形式

playoffFormat関数

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

The playoff format of a league in a season (or a World Cup in its year), or null when there was none or this package does not cover it. The rounds' names go straight to drawBracket's roundNames.

インポート

import { playoffFormat } from "@johnmorrisdotca/taisen-brackets/presets";

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

定義

function playoffFormat(league: League, year: number): PlayoffFormat | null

引数

名前型説明
leagueLeague

The league.

yearnumber

The year the playoffs were played.

戻り値

PlayoffFormat | null

The format, or null when the league had no playoffs that year or the year is outside the ones known.

例

import { playoffFormat } from "@johnmorrisdotca/taisen-brackets";

console.log(playoffFormat("nhl", 2024)?.rounds.map((round) => round.name), playoffFormat("nhl", 1900));
[
  'First Round',
  'Second Round',
  'Conference Finals',
  'Stanley Cup Final'
] null

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

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

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