Comparing version 1.0.2 to 1.1.0
@@ -14,4 +14,7 @@ | ||
exports.del = exports.delete; | ||
exports.all = create(); | ||
function create(method) { | ||
method = method.toUpperCase(); | ||
if (method) method = method.toUpperCase(); | ||
@@ -26,3 +29,3 @@ return function(path, fn){ | ||
// method | ||
if (method != this.method) return yield next; | ||
if (method && method != this.method) return yield next; | ||
@@ -33,2 +36,3 @@ // path | ||
debug('%s %s matches %s %j', this.method, path, this.path, args); | ||
args.push(next); | ||
yield fn.apply(this, args); | ||
@@ -35,0 +39,0 @@ return; |
@@ -5,3 +5,3 @@ { | ||
"repository": "koajs/route", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"keywords": [ | ||
@@ -18,3 +18,6 @@ "koa", | ||
"devDependencies": { | ||
"koa": "0.0.2" | ||
"mocha": "*", | ||
"supertest": "*", | ||
"should": "*", | ||
"koa": "koajs/koa" | ||
}, | ||
@@ -26,3 +29,6 @@ "license": "MIT", | ||
"debug": "*" | ||
}, | ||
"scripts": { | ||
"test": "make test" | ||
} | ||
} |
@@ -1,2 +0,1 @@ | ||
# koa-route | ||
@@ -12,2 +11,5 @@ | ||
If you need a full-featured solution check out [koa-router](https://github.com/alexmingoia/koa-router), | ||
a Koa clone of express-resource. | ||
## Installation | ||
@@ -56,2 +58,2 @@ | ||
MIT | ||
MIT |
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
2480
33
58
4