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

describeRankingfunction

The ranking as a sentence, the drawing's description.

Import it

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

Definition

function describeRanking(source: RankingSource, options?: Pick<RankingOptions, "locale" | "words" | "nameStyle" | "precision" | "ties" | "sort" | "rankStyle" | "rows" | "page">): string

Parameters

NameTypeDescription
sourceRankingSource

The ranking.

options (optional)Pick<RankingOptions, "locale" | "words" | "rows" | "nameStyle" | "precision" | "ties" | "sort" | "rankStyle" | "page">

The language, the words, the name style and the rows.

Returns

string

The description.

Examples

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

console.log(describeRanking({ category: "U18 · Men -60 kg", entries: [
  { name: { surname: "Nakamura", given: "Kenji" }, club: "Coastal Pine Judo", flag: "CA-BC", points: 412.5, change: 1 },
  { name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 },
  { name: { surname: "Leclerc", given: "Mathieu" }, club: "Kestrel Valley Judo", flag: "CA-QC", points: 366.25, change: 4 },
] }));
Ranking. U18 · Men -60 kg. 1, NAKAMURA Kenji, Coastal Pine Judo, 412.5 points, up 1. 2, BRAR Harpreet, Salmonberry Judo Club, 398 points, down 1. 3, LECLERC Mathieu, Kestrel Valley Judo, 366.25 points, up 4.

What it prints (run when this page was built)

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