New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koa-tree-router

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-tree-router - npm Package Compare versions

Comparing version

to
0.1.1

32

index.d.ts

@@ -29,11 +29,41 @@ import * as Koa from "koa";

constructor(opts?: Router.IRouterOptions);
/**
* Register a new route.
*/
on(method: string, path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP GET method
*/
get(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP POST method
*/
post(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP PUT method
*/
put(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP DELETE method
*/
delete(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP HEAD method
*/
head(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP OPTIONS method
*/
options(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP PATCH method
*/
patch(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP TRACE method
*/
trace(path: string, ...middleware: Array<Router.IMiddleware>);
/**
* HTTP CONNECT method
*/
connect(path: string, ...middleware: Array<Router.IMiddleware>);

@@ -40,0 +70,0 @@ /**

2

package.json
{
"name": "koa-tree-router",
"version": "0.1.0",
"version": "0.1.1",
"description": "A high performance koa router",

@@ -5,0 +5,0 @@ "main": "router.js",

@@ -198,7 +198,3 @@ const STATIC = 0;

STATIC,
numParams,
"",
[],
null,
0
numParams
);

@@ -290,3 +286,3 @@ n.children.push(child);

const child = new node("", false, PARAM, numParams, "", [], null, 0);
const child = new node("", false, PARAM, numParams);
n.children = [child];

@@ -339,3 +335,3 @@ n.wildChild = true;

// first node: catchAll node with empty path
const catchAllChild = new node("", true, CATCH_ALL, 1, "", [], null, 0);
const catchAllChild = new node("", true, CATCH_ALL, 1);
n.children = [catchAllChild];

@@ -342,0 +338,0 @@ n.indices = path[i];