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

Function joinHttpPath

src/resolution/frameworks/nestjs.ts:503–508  ·  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

501
502/** Join a controller prefix and method path into a single normalised `/path`. */
503function joinHttpPath(prefix: string, sub: string): string {
504 const parts = [prefix, sub]
505 .map((p) => p.trim().replace(/^\/+|\/+$/g, ''))
506 .filter((p) => p.length > 0);
507 return '/' + parts.join('/');
508}
509
510function lineAt(safe: string, index: number): number {
511 return safe.slice(0, index).split('\n').length;

Callers 3

extractFunction · 0.85
walkRoutesTreeFunction · 0.85
applyModulePrefixFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected