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

PlayoffFormattype

A league's playoff format in one era: the years it ran, its rounds, how many teams it took, its byes and its sources.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface PlayoffFormat {
    league: League;
    year: number;
    from: number;
    to: number | null;
    label: string;
    rounds: PlayoffRound[];
    teams: number | null;
    byes: number;
    groups: readonly [
        string,
        string
    ] | null;
    note?: string;
    emblem: string;
    sources: readonly string[];
}

Members

NameTypeDescription
leagueLeague
yearnumber

The season (or edition) this was asked for.

fromnumber

The first and last year of the era this entry covers; to is null while it is current.

tonumber | null
labelstring

The era in a few words.

roundsPlayoffRound[]

The rounds, first round first.

teamsnumber | null

How many teams start the bracket, or null where it varies.

byesnumber

The number of teams of each half that skip the first round.

groupsreadonly [string, string] | null

The names of the two halves, left first, or null where the bracket is not split in two.

note (optional)string | undefined
emblemstring

The league's default emblem id (LEAGUE_EMBLEMS), for trophy with an emblems renderer.

sourcesreadonly string[]

The English Wikipedia articles this entry was checked against (CC BY-SA 4.0; only facts are used).

Examples

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

const format: PlayoffFormat | null = playoffFormat("nhl", 2024);
console.log(format?.label, format?.rounds.length);
16 teams, eight a conference, division rounds first 4

What it prints (run when this page was built)

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