Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Ready-made formats for each league

playoffFormatfunction

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 it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

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

Parameters

NameTypeDescription
leagueLeague

The league.

yearnumber

The year the playoffs were played.

Returns

PlayoffFormat | null

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

Examples

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.