MCPcopy
hub / github.com/monkeytypegame/monkeytype / camelCaseToWords

Function camelCaseToWords

frontend/src/ts/utils/strings.ts:18–23  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

16 * @returns The string with spaces inserted before capital letters and converted to lowercase.
17 */
18export function camelCaseToWords(str: string): string {
19 return str
20 .replace(/([A-Z])/g, " $1")
21 .trim()
22 .toLowerCase();
23}
24
25/**
26 * Converts a string with words separated by spaces to camelCase.

Callers 3

FullOrPartialFunction · 0.90
setConfigFunction · 0.90
toggleFunboxFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected