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

Voicetype

A language ready to write with: the words with any replacements, and the formats.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface Voice {
    locale: Locale;
    words: Words;
    number(n: number): string;
    date(iso: string): string | null;
    upper(text: string): string;
    round(name: string): string;
    team(team: Team): string;
}

Members

NameTypeDescription
localeLocale
wordsWords
number(n: number): string

A number in the language's own digits and separators.

date(iso: string): string | null

A date as the language writes it ("Dec 18, 2022", "2022/12/18"), or null when iso does not start with a date.

upper(text: string): string

Capitals, by the language's own rules (not for Japanese).

round(name: string): string

A round's name in the language.

team(team: Team): string

A team's name in the language.

Examples

import { voiceOf, type Voice } from "@johnmorrisdotca/taisen-brackets";

const voice: Voice = voiceOf({ locale: "fr" });
console.log(voice.upper("finale"));
FINALE

What it prints (run when this page was built)

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