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

Function parseVuePathObject

src/resolution/frameworks/vue-router.ts:322–328  ·  view source on GitHub ↗
(expr: string)

Source from the content-addressed store, hash-verified

320
321/** `{ path: '/', query }` — Vue's object destination, whose key is `path`, not `pathname`. */
322export function parseVuePathObject(expr: string): HrefLiteral | null {
323 const args = expr.trim();
324 if (args[0] !== '{') return null;
325 const key = /\bpath\s*:\s*['"`]/.exec(args);
326 if (!key) return null;
327 return toHref(readStringAt(args, key.index + key[0].length - 1));
328}
329
330/** True for the `calls` ref this resolver's `extract` emitted from a route to its component. */
331function isVueRouteRef(ref: UnresolvedRef): boolean {

Callers 2

vueRouterLinkEdgesFunction · 0.90
resolveFunction · 0.85

Calls 3

toHrefFunction · 0.90
readStringAtFunction · 0.90
execMethod · 0.65

Tested by

no test coverage detected