koa-route
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -1,2 +0,1 @@ | ||
/** | ||
@@ -20,4 +19,4 @@ * Module dependencies. | ||
return function(path, fn){ | ||
var re = pathToRegexp(path); | ||
return function(path, fn, opts){ | ||
var re = pathToRegexp(path, opts); | ||
debug('%s %s -> %s', method, path, re); | ||
@@ -52,2 +51,2 @@ | ||
if (val) return decodeURIComponent(val); | ||
} | ||
} |
@@ -5,3 +5,3 @@ { | ||
"repository": "koajs/route", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"keywords": [ | ||
@@ -18,6 +18,7 @@ "koa", | ||
"devDependencies": { | ||
"mocha": "*", | ||
"supertest": "*", | ||
"istanbul-harmony": "0", | ||
"mocha": "1", | ||
"supertest": "0", | ||
"should": "*", | ||
"koa": "*" | ||
"koa": "0" | ||
}, | ||
@@ -31,4 +32,6 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "make test" | ||
"test": "NODE_ENV=test mocha --harmony-generators --require should --reporter spec", | ||
"test-cov": "NODE_ENV=test node --harmony-generators ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require should", | ||
"test-travis": "NODE_ENV=test node --harmony-generators ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --require should" | ||
} | ||
} |
@@ -43,3 +43,3 @@ # koa-route | ||
var pet = db[name]; | ||
if (!pet) return this.error('cannot find that pet', 404); | ||
if (!pet) return this.throw('cannot find that pet', 404); | ||
this.body = pet.name + ' is a ' + pet.species; | ||
@@ -46,0 +46,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2988
39
5
1