lambder 1.0.49 → 1.0.50
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.
- package/dist/Lambder.d.ts +3 -1
- package/dist/Lambder.js +1 -1
- package/package.json +1 -1
- package/src/Lambder.ts +2 -2
package/dist/Lambder.d.ts
CHANGED
|
@@ -62,7 +62,9 @@ export default class Lambder {
|
|
|
62
62
|
setRouteFallbackHandler(routeFallbackHandler: RouteFallbackHandlerFunction): void;
|
|
63
63
|
setApiFallbackHandler(apiFallbackHandler: ApiFallbackHandlerFunction): void;
|
|
64
64
|
setGlobalErrorHandler(globalErrorHandler: GlobalErrorHandlerFunction): void;
|
|
65
|
-
getPatternMatch(pattern: string, path: string):
|
|
65
|
+
getPatternMatch(pattern: string, path: string): {
|
|
66
|
+
[key: string]: any;
|
|
67
|
+
};
|
|
66
68
|
testPatternMatch(pattern: string, path: string): boolean;
|
|
67
69
|
private validateSession;
|
|
68
70
|
private handleNoMatchedAction;
|
package/dist/Lambder.js
CHANGED
|
@@ -64,7 +64,7 @@ export default class Lambder {
|
|
|
64
64
|
const result = (match(pattern, { decode: decodeURIComponent }))(path);
|
|
65
65
|
if (!result)
|
|
66
66
|
return {};
|
|
67
|
-
return result?.params;
|
|
67
|
+
return result?.params || {};
|
|
68
68
|
}
|
|
69
69
|
testPatternMatch(pattern, path) {
|
|
70
70
|
return (match(pattern, { decode: decodeURIComponent }))(path) !== false;
|
package/package.json
CHANGED
package/src/Lambder.ts
CHANGED
|
@@ -116,10 +116,10 @@ export default class Lambder {
|
|
|
116
116
|
setGlobalErrorHandler(globalErrorHandler: GlobalErrorHandlerFunction){
|
|
117
117
|
this.globalErrorHandler = globalErrorHandler;
|
|
118
118
|
}
|
|
119
|
-
getPatternMatch(pattern: string, path: string){
|
|
119
|
+
getPatternMatch(pattern: string, path: string): { [key:string]: any }{
|
|
120
120
|
const result = (match(pattern, { decode: decodeURIComponent }))(path);
|
|
121
121
|
if(!result) return {};
|
|
122
|
-
return result?.params;
|
|
122
|
+
return result?.params || {};
|
|
123
123
|
}
|
|
124
124
|
testPatternMatch(pattern: string, path: string): boolean{
|
|
125
125
|
return (match(pattern, { decode: decodeURIComponent }))(path) !== false;
|