MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / validName

Function validName

graph-ui/src/projects/AddProjectIndexDialog.tsx:45–48  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

43 return result.replace(/-+/g, '-').replace(/\.+/g, '.').replace(/^[-.]+/, '').replace(/-+$/, '') || 'root';
44}
45function validName(name: string): boolean {
46 return name.length > 0 && name.length <= 200 && /^[A-Za-z0-9_-][A-Za-z0-9._-]*$/.test(name)
47 && !name.includes('..') && normalizedName(name) === name;
48}
49const nameHint = 'Use up to 200 letters, numbers, underscores, dots or single dashes. No spaces or leading dots.';
50
51export default function AddProjectIndexDialog({ open, source, onClose, onOpenProject, onActivityChange, pollMs = 1500 }: AddProjectIndexDialogProps): JSX.Element | null {

Callers 2

startFunction · 0.85
AddProjectIndexDialogFunction · 0.85

Calls 1

normalizedNameFunction · 0.85

Tested by

no test coverage detected