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

Function parseControllerPrefix

src/resolution/frameworks/nestjs.ts:693–697  ·  view source on GitHub ↗

`@Controller('users')` | `@Controller({ path: 'users', host })` | `@Controller(['a','b'])` | `@Controller()`.

(args: string)

Source from the content-addressed store, hash-verified

691
692/** `@Controller('users')` | `@Controller({ path: 'users', host })` | `@Controller(['a','b'])` | `@Controller()`. */
693function parseControllerPrefix(args: string): string {
694 const obj = args.match(/path\s*:\s*['"`]([^'"`]*)['"`]/);
695 if (obj) return obj[1]!;
696 return parseStringArg(args);
697}
698
699/** `@WebSocketGateway({ namespace: 'chat' })` | `@WebSocketGateway(81, { namespace: '/chat' })` | `@WebSocketGateway()`. */
700function parseGatewayNamespace(args: string): string {

Callers

nothing calls this directly

Calls 1

parseStringArgFunction · 0.85

Tested by

no test coverage detected