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

Function formatString

apps/baseai.dev/src/lib/get-content-by-slug-on-dev.ts:17–22  ·  view source on GitHub ↗
(section?: string)

Source from the content-addressed store, hash-verified

15 * @returns The formatted section string.
16 */
17export function formatString(section?: string) {
18 if (!section) return '';
19 return section
20 .replace(/-/g, ' ')
21 .replace(/\b\w/g, char => char.toUpperCase());
22}
23
24const DOCS_CONTENT_PATH = `${process.cwd()}/content/docs`;
25const LEARN_CONTENT_PATH = `${process.cwd()}/content/learn`;

Callers 1

getContentBySlugOnDevFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected