* 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)
| 103 | * home page, and reading it as a layout dropped `/` from the map entirely. |
| 104 | */ |
| 105 | function 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 |
no outgoing calls
no test coverage detected