koa-morgan
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -15,2 +15,3 @@ /*! | ||
var thenify = require('thenify'); | ||
var originalMorgan = require('morgan'); | ||
@@ -31,9 +32,7 @@ | ||
function morgan() { | ||
var args = arguments; | ||
var middleware = thenify(originalMorgan.apply(null, arguments)); | ||
return function* morgan(next) { | ||
yield* next; | ||
originalMorgan.apply(null, args)(this.req, this.res, noop); | ||
yield middleware(this.req, this.res); | ||
} | ||
} | ||
function noop() {} | ||
} |
{ | ||
"name": "koa-morgan", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "HTTP request logger middleware for koa", | ||
@@ -22,4 +22,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"morgan": "^1.5.1" | ||
"morgan": "^1.5.2", | ||
"thenify": "^3.1.0" | ||
} | ||
} | ||
} |
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
3627
2
+ Addedthenify@^3.1.0
+ Addedany-promise@1.3.0(transitive)
+ Addedthenify@3.3.1(transitive)
Updatedmorgan@^1.5.2