MCPcopy Create free account
hub / github.com/TanStack/cli / validateProjectName

Function validateProjectName

packages/cli/src/utils.ts:79–90  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

77}
78
79export function validateProjectName(name: string) {
80 const { validForNewPackages, validForOldPackages, errors, warnings } =
81 validatePackageName(name)
82 const error = errors?.[0] || warnings?.[0]
83
84 return {
85 valid: validForNewPackages && validForOldPackages,
86 error:
87 error?.replace(/name/g, 'Project name') ||
88 'Project name does not meet npm package naming requirements',
89 }
90}

Callers 3

validateFunction · 0.85
promptForCreateOptionsFunction · 0.85
normalizeOptionsFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected