@ossy/router 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,5 +39,7 @@ declare class Router<T extends Page = Page> {
39
39
  }
40
40
 
41
41
  declare const padWithSlash: (string?: string) => string;
42
+ /** True when a route path is the catch-all segment (`*`, `/*`, etc.). Used for unknown-URL fallbacks. */
43
+ declare const isCatchAllRoutePath: (path: string | undefined) => boolean;
42
44
 
43
- export { Router, padWithSlash };
45
+ export { Router, isCatchAllRoutePath, padWithSlash };
@@ -1 +1 @@
1
- export{Router}from"./router.js";export{padWithSlash}from"./utli.js";
1
+ export{Router}from"./router.js";export{isCatchAllRoutePath,padWithSlash}from"./utli.js";
@@ -1,2 +1,2 @@
1
1
  export { Router } from './router';
2
- export { padWithSlash } from './utli';
2
+ export { padWithSlash, isCatchAllRoutePath } from './utli';
@@ -1 +1,3 @@
1
1
  export declare const padWithSlash: (string?: string) => string;
2
+ /** True when a route path is the catch-all segment (`*`, `/*`, etc.). Used for unknown-URL fallbacks. */
3
+ export declare const isCatchAllRoutePath: (path: string | undefined) => boolean;
@@ -0,0 +1 @@
1
+ export {};
package/build/utli.js CHANGED
@@ -1 +1 @@
1
- const t=(t="")=>(t=>"/"===t[t.length-1]?t:`${t}/`)((t=>"/"===t[0]?t:`/${t}`)(t));export{t as padWithSlash};
1
+ const e=(e="")=>(e=>"/"===e[e.length-1]?e:`${e}/`)((e=>"/"===e[0]?e:`/${e}`)(e)),r=e=>{if(null==e||"string"!=typeof e)return!1;return"*"===e.replace(/^\/+|\/+$/g,"")};export{r as isCatchAllRoutePath,e as padWithSlash};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/router",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ossy-se/packages.git"
@@ -43,5 +43,5 @@
43
43
  "access": "public",
44
44
  "registry": "https://registry.npmjs.org"
45
45
  },
46
- "gitHead": "f2d232939e2b9d06b49497c4a663f17558d9fa45"
46
+ "gitHead": "032e21b623b973a715d532580022f393b1f9d389"
47
47
  }