koa2-router
Advanced tools
Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "koa2-router", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "A express-liked router component for koa2", | ||
"main": "index.js", | ||
"types": "types.d.ts", | ||
"repository": "xinpianchang/koa2-router", | ||
@@ -31,2 +32,3 @@ "author": "Tang Ye <develop@xinpianchang.com>", | ||
"devDependencies": { | ||
"@types/koa": "^2.0.49", | ||
"delay": "^4.1.0", | ||
@@ -33,0 +35,0 @@ "http-errors": "^1.7.2", |
@@ -177,19 +177,19 @@ # koa2-router | ||
### Context | ||
* ctx.baseUrl | ||
* ctx.url | ||
* ctx.params | ||
* ctx.matched | ||
* ctx.responded | ||
* ctx.baseUrl: string | ||
* ctx.url: string | ||
* ctx.params: any | ||
* ctx.matched: string[] | ||
* ctx.responded: boolean | ||
### Router | ||
* class Router(name: String | opts: Object):(ctx, next) => void | ||
* router.use([path: String | String[]], ...middlewares: (ctx, next) => void):Router | ||
* router.route(path: String | String[]):Route | ||
* router.all([path: String | String[]], ...middlewares: (ctx, next) => void):Router | ||
* router[method]([path: String | String[]], ...middlewares: (ctx, next) => void):Router | ||
* router.params(name: String, callback: (ctx, next, value, name) => void):Router | ||
* class Router(name: string | opts: any):Middleware | ||
* router.use([path: string | string[]], ...middlewares: Middleware):Router | ||
* router.route(path: string | string[]):Route | ||
* router.all([path: string | string[]], ...middlewares: Middleware):Router | ||
* router[method]([path: string | string[]], ...middlewares: Middleware):Router | ||
* router.params(name: string, callback: (ctx, next, value: string, name: string) => void):Router | ||
### Route | ||
* route.all([path: String | String[]], ...middlewares: (ctx, next) => void):Router | ||
* route[method]([path: String | String[]], ...middlewares: (ctx, next) => void):Router | ||
* route.all([path: string | string[]], ...middlewares: Middleware):Router | ||
* route[method]([path: string | string[]], ...middlewares: Middleware):Router | ||
@@ -196,0 +196,0 @@ ## Acknowledgements |
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
36117
5