diff --git a/lib/application.js b/lib/application.js index f01526e..00f49e4 100644 --- a/lib/application.js +++ b/lib/application.js @@ -3,18 +3,18 @@ */ var debug = require('debug')('koa:application'); -var onFinished = require('finished'); var Emitter = require('events').EventEmitter; -var Stream = require('stream'); var compose = require('koa-compose'); +var isJSON = require('koa-is-json'); +var response = require('./response'); var context = require('./context'); var request = require('./request'); -var response = require('./response'); -var isJSON = require('koa-is-json'); +var finished = require('finished'); var Cookies = require('cookies'); var accepts = require('accepts'); var status = require('statuses'); var assert = require('assert'); +var Stream = require('stream'); var http = require('http'); var only = require('only'); var co = require('co'); @@ -120,7 +120,7 @@ app.callback = function(){ return function(req, res){ res.statusCode = 404; var ctx = self.createContext(req, res); - onFinished(ctx, ctx.onerror); + finished(ctx, ctx.onerror); fn.call(ctx, ctx.onerror); } }; diff --git a/lib/context.js b/lib/context.js index fc1d6e5..23b131e 100644 --- a/lib/context.js +++ b/lib/context.js @@ -3,8 +3,8 @@ * Module dependencies. */ -var assert = require('assert'); var delegate = require('delegates'); +var assert = require('assert'); var http = require('http'); /** diff --git a/lib/request.js b/lib/request.js index 27ad505..34ec754 100644 --- a/lib/request.js +++ b/lib/request.js @@ -7,8 +7,8 @@ var qs = require('querystring'); var typeis = require('type-is'); var fresh = require('fresh'); var url = require('url'); -var parse = url.parse; var stringify = url.format; +var parse = url.parse; /** * Prototype.