lib/framework/request.js
function getObject(ctx, key) {
  if (ctx.state && (key in ctx.state)) {
    return ctx.state
  }

  if (key in ctx.request) {
    return ctx.request
  }

  if (key in ctx.req) {
    return ctx.req
  }

  if (key in ctx) {
    return ctx
  }

  return undefined
}
function getObject(ctx, key) {
  if (ctx.state && (key in ctx.state)) {
    return ctx.state
  }

  if (key in ctx.request) {
    return ctx.request
  }

  if (key in ctx.req) {
    return ctx.req
  }

  if (key in ctx) {
    return ctx
  }

  return undefined
}
function getObject ( ctx , key ) { if ( ctx . state && ( key in ctx . state ) ) { return ctx . state } if ( key in ctx . request ) { return ctx . request } if ( key in ctx . req ) { return ctx . req } if ( key in ctx ) { return ctx } return undefined }
test where the key is available, either in `ctx.state`, Node's request, Koa's request or Koa's context
test where the key is available either in ctx . state Node s request Koa s request or Koa s context