MCPcopy
hub / github.com/Fission-AI/OpenSpec / folderStyleNameProblem

Function folderStyleNameProblem

src/core/id.ts:24–41  ·  view source on GitHub ↗
(
  value: string,
  label: string
)

Source from the content-addressed store, hash-verified

22 * description, or null when valid.
23 */
24export function folderStyleNameProblem(
25 value: string,
26 label: string
27): string | null {
28 if (value.length === 0) {
29 return `${label} must not be empty`;
30 }
31
32 if (value === '.' || value === '..') {
33 return `${label} must not be '${value}'`;
34 }
35
36 if (/[\\/]/u.test(value)) {
37 return `${label} must not contain path separators`;
38 }
39
40 return null;
41}

Callers 2

memberLabelProblemFunction · 0.85
validateStoreIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected