MCPcopy Index your code
hub / github.com/SyntaxUI/syntaxui / formatName

Function formatName

src/components/code/ComponentPreview.tsx:29–33  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

27}
28
29const formatName = (path: string) => {
30 const parts = path.split('/')
31 const componentName = parts[parts.length - 1]
32 return componentName.replace(/([a-z])([A-Z])/g, '$1 $2')
33}
34
35/**
36 * ComponentPreview renders a component preview with a preview and code tab.

Callers 2

ComponentPreviewFunction · 0.85
ComponentPreviewUsingCnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected