MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / extractPathParams

Function extractPathParams

src/ast/extract-php.ts:12–18  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

10import type { RouteInfo, SchemaModel, SchemaField, ExportItem } from "../types.js";
11
12function extractPathParams(path: string): string[] {
13 const params: string[] = [];
14 const regex = /\{(\w+)\??}/g;
15 let m: RegExpExecArray | null;
16 while ((m = regex.exec(path)) !== null) params.push(m[1]);
17 return params;
18}
19
20// ─── Laravel routes ────────────────────────────────────────────────────────
21

Callers 1

extractLaravelRoutesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected