/opt/canhelp/node_modules/next/dist/esm/server/route-matchers
NameSizeModeActions
app-page-route-matcher.js2650644editdlrm
app-page-route-matcher.js.map7460644editdlrm
app-route-route-matcher.js1590644editdlrm
app-route-route-matcher.js.map4780644editdlrm
locale-route-matcher.js28890644editdlrm
locale-route-matcher.js.map46200644editdlrm
pages-api-route-matcher.js2910644editdlrm
pages-api-route-matcher.js.map7490644editdlrm
pages-route-matcher.js2810644editdlrm
pages-route-matcher.js.map7200644editdlrm
route-matcher.js13860644editdlrm
route-matcher.js.map30200644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/server/route-matchers/route-matcher.js (1386B)
import { isDynamicRoute } from '../../shared/lib/router/utils'; import { getRouteMatcher } from '../../shared/lib/router/utils/route-matcher'; import { getRouteRegex } from '../../shared/lib/router/utils/route-regex'; export class RouteMatcher { constructor(definition){ this.definition = definition; if (isDynamicRoute(definition.pathname)) { this.dynamic = getRouteMatcher(getRouteRegex(definition.pathname)); } } /** * Identity returns the identity part of the matcher. This is used to compare * a unique matcher to another. This is also used when sorting dynamic routes, * so it must contain the pathname part. */ get identity() { return this.definition.pathname; } get isDynamic() { return this.dynamic !== undefined; } match(pathname) { const result = this.test(pathname); if (!result) return null; return { definition: this.definition, params: result.params }; } test(pathname) { if (this.dynamic) { const params = this.dynamic(pathname); if (!params) return null; return { params }; } if (pathname === this.definition.pathname) { return {}; } return null; } } //# sourceMappingURL=route-matcher.js.map