Join a controller prefix and method path into a single normalised `/path`.
(prefix: string, sub: string)
| 722 | |
| 723 | /** Join a controller prefix and method path into a single normalised `/path`. */ |
| 724 | function 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 | |
| 731 | function detectLanguage(filePath: string): JsLang { |
| 732 | if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) return 'typescript'; |
no test coverage detected