MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / joinHttpPath

Function joinHttpPath

src/resolution/frameworks/nestjs.ts:724–729  ·  view source on GitHub ↗

Join a controller prefix and method path into a single normalised `/path`.

(prefix: string, sub: string)

Source from the content-addressed store, hash-verified

722
723/** Join a controller prefix and method path into a single normalised `/path`. */
724function joinHttpPath(prefix: string, sub: string): string {
725 const parts = [prefix, sub]
726 .map((p) => p.trim().replace(/^\/+|\/+$/g, ''))
727 .filter((p) => p.length > 0);
728 return '/' + parts.join('/');
729}
730
731function detectLanguage(filePath: string): JsLang {
732 if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) return 'typescript';

Callers 3

extractFunction · 0.85
applyAppConfigFunction · 0.85
walkRoutesTreeFunction · 0.85

Calls 2

mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected