MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / toPascalCase

Function toPascalCase

packages/extension/utils/string.ts:15–19  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

13}
14
15export function toPascalCase(str: string) {
16 return str.replace(/(^\w|-+\w|_+\w|\s+\w)/g, (match) =>
17 match.replace(/[-_\s]+/, '').toUpperCase()
18 )
19}
20
21const ESCAPE_MAP: Record<string, string> = {
22 '&': '&amp;',

Callers 3

string.test.tsFile · 0.90
composeDataHintFunction · 0.90
composeDataHintFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected