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

RankingSourcetype

A ranking to draw: the title, the category, the date, the source and the entries.

Import it

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

Definition

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

Members

NameTypeDescription
title (optional)string | undefined

The heading. Default: the language's word for ranking.

category (optional)string | undefined

The category as a line under the heading ("U18 · Men -60 kg"; rankingCategoryLabel writes one).

date (optional)string | undefined

The date or period of the list, at the right of the heading ("October 2026").

source (optional)string | undefined

Where the list comes from, small at the foot ("Source: BC Judo").

entriesreadonly RankingEntry[]

Examples

import { rankingList, type RankingSource } from "@johnmorrisdotca/taisen-brackets";

const source: RankingSource = { category: "U18 · Men -60 kg", date: "October 2026", entries: [
  { name: { surname: "Nakamura", given: "Kenji" }, club: "Coastal Pine Judo", flag: "CA-BC", points: 412.5, change: 1 },
  { name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 },
  { name: { surname: "Leclerc", given: "Mathieu" }, club: "Kestrel Valley Judo", flag: "CA-QC", points: 366.25, change: 4 },
] };
console.log(rankingList(source).includes("U18 · Men -60 kg"));
true

What it prints (run when this page was built)

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