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

Function joinHttpPath

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

721
722/** Join a controller prefix and method path into a single normalised `/path`. */
723function joinHttpPath(prefix: string, sub: string): string {
724 const parts = [prefix, sub]
725 .map((p) => p.trim().replace(/^\/+|\/+$/g, ''))
726 .filter((p) => p.length > 0);
727 return '/' + parts.join('/');
728}
729
730function lineAt(safe: string, index: number): number {
731 return safe.slice(0, index).split('\n').length;

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