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

EntryListSourcetype

An entry list to draw: a title, a category, a date and the athletes entered, with their rank if they have one.

Import it

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

Definition

interface EntryListSource {
    title?: string;
    category?: string;
    date?: string;
    source?: string;
    entries: readonly RankingEntry[];
}

Members

NameTypeDescription
title (optional)string | undefined

The heading. Default: the language's "Entry list".

category (optional)string | undefined

The category as a pill under the heading.

date (optional)string | undefined

The event or the date, at the right of the heading.

source (optional)string | undefined

Where the list comes from, small at the foot.

entriesreadonly RankingEntry[]

The athletes in the order of the draw. An entry's rank is its ranking (none: not ranked, written NR); points are optional.

Examples

import { rankingEntryList, type EntryListSource } from "@johnmorrisdotca/taisen-brackets";

const source: EntryListSource = { category: "Men -66 kg", entries: [{ name: { surname: "Hoshino", given: "Daiki" }, code: "JPN", rank: 3 }] };
console.log(rankingEntryList(source).includes("HOSHINO Daiki"));
true

What it prints (run when this page was built)

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