MCPcopy Create free account
hub / github.com/GrapesJS/cli / getName

Function getName

src/init.ts:25–30  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

23const rootPath = process.cwd();
24
25const getName = (str: string) => str
26 .replace(/\_/g, '-')
27 .split('-')
28 .filter(i => i)
29 .map(i => i[0].toUpperCase() + i.slice(1))
30 .join(' ');
31
32const getTemplateFileContent = (pth: string) => {
33 const pt = path.resolve(__dirname, `${tmpPath}/${pth}`);

Callers 1

init.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected