Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
No EOL
542 B
Text
18 lines
No EOL
542 B
Text
/**
|
|
* Normalizes the pathname by removing the locale prefix if any.
|
|
*/ export class LocaleRouteNormalizer {
|
|
constructor(provider){
|
|
this.provider = provider;
|
|
}
|
|
/**
|
|
* Normalizes the pathname by removing the locale prefix if any.
|
|
*
|
|
* @param pathname The pathname to normalize.
|
|
* @returns The pathname without the locale prefix (if any).
|
|
*/ normalize(pathname) {
|
|
const match = this.provider.analyze(pathname);
|
|
return match.pathname;
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=locale-route-normalizer.js.map |