MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / snakeToCamelCase

Function snakeToCamelCase

console/src/util.ts:158–165  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

156 * e.g. "some_example_string" returns a "someExampleString".
157 */
158export function snakeToCamelCase(input: string): string {
159 return input
160 .split("_")
161 .map((word, index) =>
162 index === 0 ? word : capitalizeSentence(word, false),
163 )
164 .join("");
165}
166
167/**
168 * e.g. "some_example_string" returns a "Some example string".

Callers 1

extractSubscribeMetadataFunction · 0.90

Calls 4

capitalizeSentenceFunction · 0.85
joinMethod · 0.45
mapMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected