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 · Draw a bracket, a table or a road to the final

BoutAthletetype

One of the two athletes of a bout. Only name is needed.

Import it

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

Definition

interface BoutAthlete {
    name: string | RankingName;
    code?: string;
    flag?: string;
    mark?: string;
}

Members

NameTypeDescription
namestring | RankingName

The name as it is to be written (MAYER M.), or its two parts (set by nameStyle).

code (optional)string | undefined

The country's three letters.

flag (optional)string | undefined

A code for the flags function, drawn 4:3.

mark (optional)string | undefined

A mark of your own in place of a flag.

Examples

import { boutBoard, type BoutAthlete } from "@johnmorrisdotca/taisen-brackets";

const red: BoutAthlete = { code: "BRA", flag: "BR", name: "TAVARES M." };
console.log(boutBoard({ title: "Final", red, blue: { name: "MAYER M." } }).includes("TAVARES"));
true

What it prints (run when this page was built)

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