MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / toPascalCase

Function toPascalCase

packages/cli/src/actions/pull/casing.ts:27–30  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

25}
26
27export function toPascalCase(str: string): string {
28 if (isAllUpperCase(str)) return str;
29 return str.replace(/[_\- ]+(\w)/g, (_, c) => c.toUpperCase()).replace(/^\w/, (c) => c.toUpperCase());
30}
31
32export function toCamelCase(str: string): string {
33 if (isAllUpperCase(str)) return str;

Callers 2

casing.test.tsFile · 0.90
resolveNameCasingFunction · 0.85

Calls 1

isAllUpperCaseFunction · 0.85

Tested by

no test coverage detected