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

Function parseControllerPrefix

src/resolution/frameworks/nestjs.ts:694–698  ·  view source on GitHub ↗

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

(args: string)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

parseStringArgFunction · 0.85

Tested by

no test coverage detected