MCPcopy Create free account
hub / github.com/formkit/formkit / camel2title

Function camel2title

packages/addons/src/plugins/multiStep/multiStepPlugin.ts:222–228  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

220 * @returns string
221 */
222const camel2title = (str: string) => {
223 if (!str) return str
224 return str
225 .replace(/([A-Z])/g, (match: string) => ` ${match}`)
226 .replace(/^./, (match: string) => match.toUpperCase())
227 .trim()
228}
229
230/**
231 * Compares steps to DOM order and reorders steps if needed

Callers 2

createSSRStepsFromTabsFunction · 0.85
setStepNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected