lib/index.js
function promiseMiddleware (request, response, middleware) {
  return new promiseMiddleware.Promise(function (resolve, reject) {
    middleware(request, response, function next (error) {
      return error ? reject(error) : resolve()
    })
  })
}
function promiseMiddleware (request, response, middleware) {
  return new promiseMiddleware.Promise(function (resolve, reject) {
    middleware(request, response, function next (error) {
      return error ? reject(error) : resolve()
    })
  })
}
function promiseMiddleware ( request , response , middleware ) { return new promiseMiddleware . Promise ( function ( resolve , reject ) { middleware ( request , response , function next ( error ) { return error ? reject ( error ) : resolve ( ) } ) } ) }
Use callback middleware functions as promises.

@param {Object} request
@param {Object} response
@param {Function} middleware
Use callback middleware functions as promises .