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

describeTiefunction

A tie in a sentence, for a tooltip, a table and a description: "Argentina 3, France 3 (after extra time, 4–2 on penalties). Winner: Argentina".

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

function describeTie(tie: Tie, v: Voice): string

Parameters

NameTypeDescription
tieTie

The tie.

vVoice

The voice of a language, from voiceOf.

Returns

string

The sentence, in the voice's language.

Examples

import { describeTie, layoutBracket, voiceOf } from "@johnmorrisdotca/taisen-brackets";

const { ties } = layoutBracket([{ sides: ["Aurora", "Harbour"], score: [2, 1] }]);
console.log(describeTie(ties[0], voiceOf({})));
Aurora 2, Harbour 1. Winner: Aurora

What it prints (run when this page was built)

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