library_labels.ts

How the site names a library's engine kind and output shape, the same in the libraries table and in the results page's filters.

view source

Declarations
#

5 declarations

ENGINE_LABELS
#

library_labels.ts view source

Record<"scanner" | "grammar_vm" | "regex" | "textmate", string>

type Record<"scanner" | "grammar_vm" | "regex" | "textmate", string>

import {ENGINE_LABELS} from '@ryanatkn/syntax-highlighter-bench/library_labels.js';

The name of each engine kind.

format_library_tag
#

library_labels.ts view source

(id: string): string import {format_library_tag} from '@ryanatkn/syntax-highlighter-bench/library_labels.js';

The name of an engine kind or an output shape, or the id for one it doesn't know.

id

type string

returns

string

LIBRARY_COLORS
#

library_labels.ts view source

readonly string[] import {LIBRARY_COLORS} from '@ryanatkn/syntax-highlighter-bench/library_labels.js';

One color per library, by its place in the roster, so a library's bars are the same color in every chart. The ratio beside a bar carries the verdict, colored by the ratio scale, as tsv's benchmark charts do.

OUTPUT_LABELS
#

library_labels.ts view source

Record<"classes" | "inline_styles", string>

type Record<"classes" | "inline_styles", string>

import {OUTPUT_LABELS} from '@ryanatkn/syntax-highlighter-bench/library_labels.js';

The name of each output shape.

to_library_color
#

library_labels.ts view source

(index: number): string import {to_library_color} from '@ryanatkn/syntax-highlighter-bench/library_labels.js';

The color of the library at index in the roster, cycling past the last.

index

type number

returns

string

Depends on
#

Imported by
#