Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/router

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/router - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

6

CHANGELOG.md
# @tinyhttp/router
## 0.5.2
### Patch Changes
- Fix `router.all`
## 0.5.1

@@ -4,0 +10,0 @@

1

dist/index.d.ts

@@ -34,2 +34,3 @@ /// <reference types="node" />

apps: Record<string, App>;
route(path: string): App;
get(...args: RouterMethodParams<Req, Res>): this;

@@ -36,0 +37,0 @@ post(...args: RouterMethodParams<Req, Res>): this;

@@ -33,2 +33,7 @@ import { METHODS } from 'http';

}
route(path) {
const router = new Router();
this.use(path, router);
return router;
}
get(...args) {

@@ -377,3 +382,5 @@ pushMiddleware(this.middleware)({

pushMiddleware(this.middleware)({
...args,
path: args[0],
handler: args[1],
handlers: args.slice(2),
method,

@@ -380,0 +387,0 @@ type: 'route',

2

package.json
{
"name": "@tinyhttp/router",
"version": "0.5.1",
"version": "0.5.2",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Router for tinyhttp",

@@ -134,2 +134,10 @@ import { METHODS, IncomingMessage as I, ServerResponse as R } from 'http'

route(path: string): App {
const router = new Router<App, Req, Res>()
this.use(path, router as App)
return router as App
}
get(...args: RouterMethodParams<Req, Res>) {

@@ -479,3 +487,5 @@ pushMiddleware<Req, Res>(this.middleware)({

pushMiddleware(this.middleware)({
...args,
path: args[0],
handler: args[1],
handlers: args.slice(2) as Handler<Req, Res>[],
method,

@@ -482,0 +492,0 @@ type: 'route',

Sorry, the diff of this file is not supported yet

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