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

Function isPathlessLayout

src/resolution/frameworks/tanstack-router.ts:105–110  ·  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

103 * home page, and reading it as a layout dropped `/` from the map entirely.
104 */
105function isPathlessLayout(raw: string): boolean {
106 if (raw.length > 1 && raw.endsWith('/')) return false; // an index route, not the layout
107 const segs = raw.split('/').filter((s) => s.length > 0);
108 const last = segs[segs.length - 1];
109 return last !== undefined && last.startsWith('_');
110}
111
112/**
113 * 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