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

Function kebabToSentenceCase

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

Source from the content-addressed store, hash-verified

115 * e.g. "some-example-string" returns a "Some example string".
116 */
117export function kebabToSentenceCase(input: string): string {
118 return input
119 .split("-")
120 .map((word, index) =>
121 index === 0 ? capitalizeSentence(word, false) : word.toLowerCase(),
122 )
123 .join(" ");
124}
125
126/**
127 * e.g. "some-example-string" returns a "Some Example String".

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected