MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / toPascal

Function toPascal

src/components/common/TabsLayout.jsx:127–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 if (!category || !subcategory) return null;
126
127 const toPascal = str =>
128 str
129 .split('-')
130 .map(word => word.charAt(0).toUpperCase() + word.slice(1))
131 .join('');
132
133 const categoryName = toPascal(category);
134 const componentName = toPascal(subcategory);

Callers 1

TabsLayoutFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected