dist/wrap.js
function wrapRoute(fn) {
  if (!_lodash2.default.isFunction(fn)) {
    throw new Error('fn should be a function');
  }
  return function (req, res, next) {
    try {
      var result = fn(req, res, next);
      if (result && result.catch) {
        result.catch(next);
      }
    } catch (e) {
      next(e);
    }
  };
}
function wrapRoute(fn) {
  if (!_lodash2.default.isFunction(fn)) {
    throw new Error('fn should be a function');
  }
  return function (req, res, next) {
    try {
      var result = fn(req, res, next);
      if (result && result.catch) {
        result.catch(next);
      }
    } catch (e) {
      next(e);
    }
  };
}
Wrap async function to standard express function
@param {Function} fn the async function
@returns {Function} the wrapped function