MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toCamelCase

Function toCamelCase

packages/plugins/openapi/src/sdk/definitions.ts:28–33  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

26const normalizeWord = (value: string): string => value.toLowerCase();
27
28const toCamelCase = (value: string): string => {
29 const words = splitWords(value).map(normalizeWord);
30 if (words.length === 0) return "tool";
31 const [first, ...rest] = words;
32 return `${first}${rest.map((p) => `${p[0]?.toUpperCase() ?? ""}${p.slice(1)}`).join("")}`;
33};
34
35const toPascalCase = (value: string): string => {
36 const camel = toCamelCase(value);

Callers 3

toPascalCaseFunction · 0.85
normalizeGroupSegmentFunction · 0.85
deriveLeafFunction · 0.85

Calls 1

splitWordsFunction · 0.85

Tested by

no test coverage detected