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

isEmblemIdfunction

Whether a trophy value names an emblem ("trophy:hockey-cup", "medal:gold/line") rather than being inline SVG or an image address.

Import it

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

Definition

function isEmblemId(value: string): boolean

Parameters

NameTypeDescription
valuestring

The text of a trophy option.

Returns

boolean

true for an emblem id.

Examples

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

console.log(isEmblemId("trophy:hockey-cup"), isEmblemId("https://example.com/cup.svg"));
true false

What it prints (run when this page was built)

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