@uppercod/exp-route
Advanced tools
Comparing version 1.2.5 to 1.2.6
{ | ||
"name": "@uppercod/exp-route", | ||
"type": "module", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "exp-route, designed to compare routes on the client based on simple expressions", | ||
@@ -6,0 +6,0 @@ "main": "./exp-route.cjs", |
@@ -1,2 +0,3 @@ | ||
const HASH = "(?:/#|#)"; | ||
const HASH = "(?:(?:/){0,1}#(?:/){0,1})"; | ||
const SLASH = "(?:/)"; | ||
/** | ||
@@ -21,3 +22,3 @@ * | ||
const slash = | ||
(hash ? HASH : "(?:/)") + (type == "[" ? "{0,1}" : "{1}"); | ||
(hash ? HASH : SLASH) + (type == "[" ? "{0,1}" : "{1}"); | ||
return spread | ||
@@ -34,7 +35,6 @@ ? `${slash}(.${wildcard})` | ||
.join(""); | ||
return [ | ||
RegExp( | ||
(!regFolders.indexOf(HASH) ? "" : "^") + | ||
(regFolders || "(?:/){0,1}") + | ||
(regFolders || SLASH + "{0,1}") + | ||
"$" | ||
@@ -41,0 +41,0 @@ ), |
Sorry, the diff of this file is not supported yet
9448
238