Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
27
node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
generated
vendored
Normal file
27
node_modules/next/dist/shared/lib/router/utils/is-dynamic.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "isDynamicRoute", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return isDynamicRoute;
|
||||
}
|
||||
});
|
||||
const _interceptionroutes = require("./interception-routes");
|
||||
// Identify /.*[param].*/ in route string
|
||||
const TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
|
||||
// Identify /[param]/ in route string
|
||||
const TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
|
||||
function isDynamicRoute(route, strict) {
|
||||
if (strict === void 0) strict = true;
|
||||
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
|
||||
route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
|
||||
}
|
||||
if (strict) {
|
||||
return TEST_STRICT_ROUTE.test(route);
|
||||
}
|
||||
return TEST_ROUTE.test(route);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=is-dynamic.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue