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

Function isPathlessLayout

src/resolution/frameworks/tanstack-router.ts:108–113  ·  view source on GitHub ↗

* True when the literal names a pathless layout rather than a page. * * `'/_auth'` is the layout file itself — it renders an outlet, at no address * of its own. `'/_auth/'` is the INDEX route inside that layout, and its * address is whatever the layout sits at: `_layout/index.tsx` is a project's

(raw: string)

Source from the content-addressed store, hash-verified

106 * home page, and reading it as a layout dropped `/` from the map entirely.
107 */
108function isPathlessLayout(raw: string): boolean {
109 if (raw.length > 1 && raw.endsWith('/')) return false; // an index route, not the layout
110 const segs = raw.split('/').filter((s) => s.length > 0);
111 const last = segs[segs.length - 1];
112 return last !== undefined && last.startsWith('_');
113}
114
115/**
116 * True for a file that wraps a subtree rather than rendering a page at its own

Callers 1

parseTanstackRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected