Reference · Where every tie sits
roundNamefunction
The name of a round that has remaining teams left in it, counting from the final: Final, Semi-finals, Quarter-finals, Round of 16…
Import it
import { roundName } from "@johnmorrisdotca/taisen-brackets/layout";
Also exported from: @johnmorrisdotca/taisen-brackets/presets, @johnmorrisdotca/taisen-brackets
Definition
function roundName(remaining: number): string
Parameters
| Name | Type | Description |
|---|---|---|
remaining | number | How many teams are left in the round: 2 is the final, 4 the semi-finals, 8 the quarter-finals. |
Returns
string
The round's English name.
Examples
import { roundName } from "@johnmorrisdotca/taisen-brackets";
console.log([2, 4, 8, 16].map((teams) => roundName(teams)));[ 'Final', 'Semi-finals', 'Quarter-finals', 'Round of 16' ]What it prints (run when this page was built)