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

Method normalizeSegments

src/utils/file-system.ts:111–115  ·  view source on GitHub ↗
(segments: string[])

Source from the content-addressed store, hash-verified

109 }
110
111 private static normalizeSegments(segments: string[]): string[] {
112 return segments
113 .flatMap((segment) => segment.split(/[\\/]+/u))
114 .filter((part) => part.length > 0);
115 }
116
117 static joinPath(basePath: string, ...segments: string[]): string {
118 const normalizedSegments = this.normalizeSegments(segments);

Callers 1

joinPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected