bpms_site/.svn/pristine/5c/5c879535df58cead00d96f0f70d5a0e12f4b1bfc.svn-base
2025-11-02 16:38:49 +03:30

18 lines
542 B
Plaintext

/**
* 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