MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / formatString

Function formatString

apps/baseai.dev/src/scripts/generate-content.js:16–21  ·  view source on GitHub ↗

* Formats a section string by replacing hyphens with spaces and capitalizing the first letter of each word. * * @param section - The section string to format. * @returns The formatted section string.

(section)

Source from the content-addressed store, hash-verified

14 * @returns The formatted section string.
15 */
16async function formatString(section) {
17 if (!section) return '';
18 return section
19 .replace(/-/g, ' ')
20 .replace(/\b\w/g, char => char.toUpperCase());
21}
22
23async function fetchMDXContent({ slug, section, dirPath, baseUrl }) {
24 const { serialize } = await import('next-mdx-remote/serialize');

Callers 1

fetchMDXContentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected