MCPcopy
hub / github.com/wojtekmaj/react-lifecycle-methods-diagram / splitUpperCase

Function splitUpperCase

src/shared/utils.ts:35–43  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

33
34// Splits camelCase with ZWJ characters to help with line breaking
35export function splitUpperCase(str: string): string {
36 if (!str) {
37 return str;
38 }
39
40 return str
41 .split('')
42 .reduce((res, letter) => res + (isUppercase(letter) ? `\u00ad${letter}` : letter), '');
43}

Callers 2

DocLinkLinkFunction · 0.85
DocLinkSpanFunction · 0.85

Calls 1

isUppercaseFunction · 0.85

Tested by

no test coverage detected