MCPcopy Create free account
hub / github.com/chhoumann/quickadd / normalizeStyle

Function normalizeStyle

src/utils/caseTransform.ts:13–29  ·  view source on GitHub ↗
(style?: string)

Source from the content-addressed store, hash-verified

11 | "slug";
12
13function normalizeStyle(style?: string): CaseStyle | null {
14 if (!style) return null;
15 const normalized = style.trim().toLowerCase();
16 switch (normalized) {
17 case "kebab":
18 case "snake":
19 case "camel":
20 case "pascal":
21 case "title":
22 case "lower":
23 case "upper":
24 case "slug":
25 return normalized;
26 default:
27 return null;
28 }
29}
30
31/** The case styles {@link transformCase} understands, in the order shown to the
32 * user when an unrecognized |case: style is rejected. */

Callers 2

isSupportedCaseStyleFunction · 0.85
transformCaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected