MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / formatEnumChoice

Function formatEnumChoice

src/telemetry/flagUtils.ts:20–24  ·  view source on GitHub ↗

* For enums, log the value as uppercase. * We're going to have an enum for such flags with choices represented * as an `enum` where the keys of the enum will map to the uppercase `choice`.

(snakeCaseName: string, choice: string)

Source from the content-addressed store, hash-verified

18 * as an `enum` where the keys of the enum will map to the uppercase `choice`.
19 */
20function formatEnumChoice(snakeCaseName: string, choice: string): string {
21 return stripUnderscoreBeforeNumber(
22 `${snakeCaseName}_${choice}`,
23 ).toUpperCase();
24}
25
26/**
27 * Computes telemetry flag usage from parsed arguments and CLI options.

Callers 2

computeFlagUsageFunction · 0.85
getPossibleFlagMetricsFunction · 0.85

Calls 1

Tested by

no test coverage detected