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

rankingCategoryLabelfunction

A category as a heading ("U18 · Men -60 kg"): an age group, a sex and a weight, any of them, joined by a dot. A weight is -60 or +100 (kg) or any text.

Import it

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

Definition

function rankingCategoryLabel(category: { age?: string; sex?: "men" | "women" | "open"; weight?: string; }, locale?: string): string

Parameters

NameTypeDescription
category{ age?: string; sex?: "men" | "women" | "open"; weight?: string; }

The age group, the sex and the weight class, each optional.

locale (optional)string | undefined

The language. Default English.

Returns

string

The label.

Examples

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

console.log(rankingCategoryLabel({ age: "U18", sex: "men", weight: "-60" }));
U18 · Men -60 kg

What it prints (run when this page was built)

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