Socket
Socket
Sign inDemoInstall

itty-router

Package Overview
Dependencies
Maintainers
2
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itty-router - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

1

CHANGELOG.md
## 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)

7

dist/itty-router.d.ts
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc