MCPcopy
hub / github.com/coder/mux / stripTrailingSlashes

Function stripTrailingSlashes

src/node/utils/pathUtils.ts:41–43  ·  view source on GitHub ↗
(inputPath: string)

Source from the content-addressed store, hash-verified

39 * stripTrailingSlashes("/home/user/project//") // => "/home/user/project"
40 */
41export function stripTrailingSlashes(inputPath: string): string {
42 return inputPath.replace(/[/\\]+$/, "");
43}
44
45/**
46 * Validate that a project path exists and is a directory.

Callers 15

loadConfigOrDefaultMethod · 0.90
isProjectTrustedFunction · 0.90
resolveRealProjectPathFunction · 0.90
readGitTopLevelFunction · 0.90
removeMethod · 0.90
createMethod · 0.90
createMultiProjectMethod · 0.90
removeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected