Reference · Draw a bracket, a table or a road to the final
judoCategoryLabelfunction
A weight category as a heading in a language: "Men -66 kg", "Women +78 kg".
Import it
import { judoCategoryLabel } from "@johnmorrisdotca/taisen-brackets";
Definition
function judoCategoryLabel(category: JudoCategory, locale?: string): string
Parameters
| Name | Type | Description |
|---|---|---|
category | JudoCategory | The sex and the weight class. |
locale (optional) | string | undefined | The language. Default English. |
Returns
string
The label.
Examples
import { judoCategoryLabel } from "@johnmorrisdotca/taisen-brackets";
console.log(judoCategoryLabel({ sex: "women", weight: "-48" }, "es"), judoCategoryLabel({ sex: "men", weight: "+100" }));Mujeres -48 kg Men +100 kgWhat it prints (run when this page was built)