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

Function expression

src/resolution/frameworks/react.ts:1284–1284  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

1282 if (tag[1] === 'Route' && i < source.length) {
1283 const pathText = attrs.get('path');
1284 const expression = (name: string) => attrs.get(name)?.replace(/^\{([\s\S]*)\}$/, '$1');
1285 // `path="team"`, or the same string in braces: `path={"team"}`.
1286 const path = literal(pathText ?? '') ?? literal(expression('path') ?? '');
1287 routeTags.push({ at, spreads, path: expression('path')?.trim() });

Callers 1

jsxFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected