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 · Where every tie sits

Localetype

A language: its words, the names of the rounds (by their English names), and the tag Intl formats numbers and dates for.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface Locale {
    code: string;
    tag: string;
    words: Words;
    rounds: Readonly<Record<string, string>>;
}

Members

NameTypeDescription
codestring

The code (fr) and the tag (fr-CA, ja-JP) used for numbers, dates and capitals.

tagstring
wordsWords
roundsReadonly<Record<string, string>>

Round names by their English name: { "Round of 16": "Huitièmes de finale" }. A round with no entry keeps its name (or roundOf).

Examples

import { localeOf, type Locale } from "@johnmorrisdotca/taisen-brackets";

const french: Locale = localeOf("fr");
console.log(french.code, french.tag, french.words.champion);
fr fr Champion

What it prints (run when this page was built)

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