MCPcopy Index your code
hub / github.com/Waishnav/devspace / sanitizePathSegment

Function sanitizePathSegment

src/git-worktrees.ts:155–160  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

153}
154
155function sanitizePathSegment(value: string): string {
156 return value
157 .replace(/[^a-zA-Z0-9._-]+/g, "-")
158 .replace(/^-+|-+$/g, "")
159 .slice(0, 80);
160}
161
162async function git(args: string[], cwd: string): Promise<string> {
163 try {

Callers 1

managedWorktreePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected