itty-router
Advanced tools
Comparing version 1.4.1 to 1.4.2
## Changelog | ||
Until this library makes it to a production release of v1.x, **minor versions may contain breaking changes to the API**. After v1.x, semantic versioning will be honored, and breaking changes will only occur under the umbrella of a major version bump. | ||
- **v1.4.1** - fixed typings for extra args (thanks [@rodrigoaddor](https://github.com/rodrigoaddor)) | ||
- **v1.4.0** - adds support for optional format params (e.g. "/:id.:format?" --> { params: { id: '13', format: 'jpg' }}) | ||
@@ -5,0 +6,0 @@ - **v1.3.0** - adds support for multiple args to handle(request, ...args) method (@hunterloftis) |
interface RouteHandler<TRequest> { | ||
(request: TRequest & Request): any | ||
(request: TRequest & Request, ...args: any): any | ||
} | ||
@@ -20,4 +20,5 @@ | ||
interface Router { | ||
handle: (request: Request) => any | ||
type Router = { | ||
handle: (request: Request, ...extra: any) => any | ||
} & { | ||
[any:string]: Route | ||
@@ -24,0 +25,0 @@ } |
{ | ||
"name": "itty-router", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Tiny, zero-dependency router with route param and query parsing.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/itty-router.min.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15181
50