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

RankingEntrytype

One line of a ranking. Only name is needed.

Import it

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

Definition

interface RankingEntry {
    name: string | RankingName;
    rank?: number;
    points?: number | string;
    club?: string;
    country?: string;
    code?: string;
    flag?: string;
    mark?: string;
    category?: string;
    change?: number | "new";
    champion?: boolean | "interim";
}

Members

NameTypeDescription
namestring | RankingName

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

rank (optional)number | undefined

The rank. Left out, the position in the list, with equal points sharing a rank (ties). A champion has none.

points (optional)string | number | undefined

A number (shown to precision decimals) or text (shown as it is).

club (optional)string | undefined
country (optional)string | undefined

The country's or region's name, written under the name in a podium row.

code (optional)string | undefined

The country's three letters (CAN), written in the compact rows.

flag (optional)string | undefined

A code for the flags renderer: a country (JP) or a Canadian province or territory (CA-BC).

mark (optional)string | undefined

A mark of your own (an image address or inline SVG) in place of a flag: a club's emblem.

category (optional)string | undefined

This athlete's category ("U18 · -60 kg"), written in the second line when categories is on: for a list that mixes categories.

change (optional)number | "new" | undefined

The movement since the last list: whole places up (positive) or down (negative), 0 for none, "new" for newly ranked ("NR").

champion (optional)boolean | "interim" | undefined

The champion of the division: a row marked "C" above the ranks ("interim" for an interim champion).

Examples

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

const entry: RankingEntry = { name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 };
console.log(rankingList({ entries: [entry] }).includes("BRAR Harpreet"));
true

What it prints (run when this page was built)

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