MCPcopy Index your code
hub / github.com/massCodeIO/massCode / findInvalidEntryNameChars

Function findInvalidEntryNameChars

src/shared/entryNameValidation.ts:31–48  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

29}
30
31export function findInvalidEntryNameChars(name: string): string[] {
32 const chars: string[] = []
33 const seen = new Set<string>()
34
35 for (const char of name) {
36 const isInvalid
37 = INVALID_ENTRY_NAME_CHARS.has(char) || char.charCodeAt(0) <= 0x1F
38
39 if (!isInvalid || seen.has(char)) {
40 continue
41 }
42
43 seen.add(char)
44 chars.push(char)
45 }
46
47 return chars
48}
49
50export function formatEntryNameValidationChars(chars: string[]): string {
51 return chars

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected