express-async-handler
Advanced tools
Comparing version 1.1.0 to 1.1.1
const asyncUtil = fn => | ||
function asyncUtilWrap(req, res, next, ...args) { | ||
if (fn instanceof Promise) { | ||
return fn(req, res, next, ...args).catch(next) | ||
const fnReturn = fn(req, res, next, ...args) | ||
if (fnReturn instanceof Promise) { | ||
return fnReturn.catch(next) | ||
} else { | ||
return fn(req, res, next, ...args) | ||
return fnReturn | ||
} | ||
@@ -8,0 +9,0 @@ } |
{ | ||
"name": "express-async-handler", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Express Error Handler for Async Functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
11689
70