Reference · Draw a bracket, a table or a road to the final
RankingEntrytype
One line of a ranking. Only name is needed.
Import it
import type { RankingEntry } from "@johnmorrisdotca/taisen-brackets";
Definition
interface RankingEntry {
name: string | RankingName;
rank?: number;
points?: number | string;
club?: string;
country?: string;
code?: string;
flag?: string;
mark?: string;
category?: string;
change?: number | "new";
champion?: boolean | "interim";
}
Members
| Name | Type | Description |
|---|---|---|
name | string | RankingName | The name as it is to be written, or its two parts (set by |
rank (optional) | number | undefined | The rank. Left out, the position in the list, with equal points sharing a rank ( |
points (optional) | string | number | undefined | A number (shown to |
club (optional) | string | undefined | |
country (optional) | string | undefined | The country's or region's name, written under the name in a podium row. |
code (optional) | string | undefined | The country's three letters ( |
flag (optional) | string | undefined | A code for the |
mark (optional) | string | undefined | A mark of your own (an image address or inline SVG) in place of a flag: a club's emblem. |
category (optional) | string | undefined | This athlete's category ("U18 · -60 kg"), written in the second line when |
change (optional) | number | "new" | undefined | The movement since the last list: whole places up (positive) or down (negative), |
champion (optional) | boolean | "interim" | undefined | The champion of the division: a row marked "C" above the ranks ( |
Examples
import { rankingList, type RankingEntry } from "@johnmorrisdotca/taisen-brackets";
const entry: RankingEntry = { name: { surname: "Brar", given: "Harpreet" }, club: "Salmonberry Judo Club", flag: "CA-BC", points: 398, change: -1 };
console.log(rankingList({ entries: [entry] }).includes("BRAR Harpreet"));trueWhat it prints (run when this page was built)