index.js
function wrapFn (gen) {
  if (!is.function(gen)) throw new Error('Middleware must be a function')
  if (!is.generator(gen)) return gen

  // wrap generator with raco
  var fn = raco.wrap(gen)
  return function (ctx, next) {
    fn.call(this, ctx, next)
  }
}
function wrapFn (gen) {
  if (!is.function(gen)) throw new Error('Middleware must be a function')
  if (!is.generator(gen)) return gen

  // wrap generator with raco
  var fn = raco.wrap(gen)
  return function (ctx, next) {
    fn.call(this, ctx, next)
  }
}
function wrapFn ( gen ) { if ( ! is . function ( gen ) ) throw new Error ( 'Middleware must be a function' ) if ( ! is . generator ( gen ) ) return gen // wrap generator with raco var fn = raco . wrap ( gen ) return function ( ctx , next ) { fn . call ( this , ctx , next ) } }
wrap ginga middleware function
wrap ginga middleware function