MCPcopy
hub / github.com/QwikDev/qwik / parseRouteIndexName

Function parseRouteIndexName

packages/qwik-city/src/utils/fs.ts:6–21  ·  view source on GitHub ↗
(extlessName: string)

Source from the content-addressed store, hash-verified

4import { normalizePathname } from './pathname';
5
6export function parseRouteIndexName(extlessName: string) {
7 let layoutName = '';
8 const layoutStop = extlessName.endsWith('!');
9
10 if (layoutStop) {
11 extlessName = extlessName.slice(0, extlessName.length - 1);
12 }
13
14 const namedLayoutParts = extlessName.split('@');
15 if (namedLayoutParts.length > 1) {
16 namedLayoutParts.shift();
17 layoutName = namedLayoutParts.join('@');
18 }
19
20 return { layoutName, layoutStop };
21}
22
23export function getPathnameFromDirPath(opts: NormalizedPluginOptions, dirPath: string) {
24 // get relative file system path from the dirname

Callers 2

fs.unit.tsFile · 0.90
resolveRouteFunction · 0.90

Calls 1

joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…