MCPcopy Index your code
hub / github.com/bitjson/typescript-starter / validateName

Function validateName

src/cli/utils.ts:63–69  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

61}
62
63export function validateName(input: string): true | string {
64 return !validateNpmPackageName(input).validForNewPackages
65 ? 'Name should be in-kebab-case (for npm)'
66 : existsSync(input)
67 ? `The "${input}" path already exists in this directory.`
68 : true;
69}
70
71export function getIntro(columns: number | undefined): string {
72 const ascii = `

Callers 2

checkArgsFunction · 0.90
cli.unit.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected