MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / v2PageForSlashedPath

Function v2PageForSlashedPath

apps/cloud/src/edge/marketing.ts:149–153  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

147/** The page a slashed v2 page (`/pricing/`) canonicalizes to (`/pricing`),
148 * or `null`. Deeper paths (`/pricing/extra`) stay with v1. */
149export const v2PageForSlashedPath = (pathname: string): string | null => {
150 if (!pathname.endsWith("/")) return null;
151 const page = pathname.slice(0, -1);
152 return V2_EXACT_PAGES.has(page) ? page : null;
153};
154
155/** v2's dashboard pages are `/org/<slug>/...` on v2's app host. `org` is a
156 * reserved v1 slug and v1's own `/org` page has nothing below it, so

Callers 2

marketing.test.tsFile · 0.90
v2EdgeResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected