Spaces:
Running
Running
| ; | |
| 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 = 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 |