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>
17 lines
No EOL
577 B
Text
17 lines
No EOL
577 B
Text
export class SuffixPathnameNormalizer {
|
|
constructor(suffix){
|
|
this.suffix = suffix;
|
|
}
|
|
match(pathname) {
|
|
// If the pathname doesn't end in the suffix, we don't match.
|
|
if (!pathname.endsWith(this.suffix)) return false;
|
|
return true;
|
|
}
|
|
normalize(pathname, matched) {
|
|
// If we're not matched and we don't match, we don't need to normalize.
|
|
if (!matched && !this.match(pathname)) return pathname;
|
|
return pathname.substring(0, pathname.length - this.suffix.length);
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=suffix.js.map |