Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
26
node_modules/next/dist/server/normalizers/locale-route-normalizer.js
generated
vendored
Normal file
26
node_modules/next/dist/server/normalizers/locale-route-normalizer.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "LocaleRouteNormalizer", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return LocaleRouteNormalizer;
|
||||
}
|
||||
});
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue