lint: remove unused references, fix global leak

This commit is contained in:
Jonathan Ong 2013-12-09 01:53:18 -08:00
parent 3c3de7be4e
commit 0c330ffb1a
3 changed files with 1 additions and 16 deletions

View file

@ -4,9 +4,6 @@
*/ */
var debug = require('debug')('koa:context'); var debug = require('debug')('koa:context');
var Request = require('./request');
var Response = require('./response');
var Cookies = require('cookies');
var http = require('http'); var http = require('http');
/** /**

View file

@ -5,15 +5,9 @@
var debug = require('debug')('koa:context'); var debug = require('debug')('koa:context');
var Negotiator = require('negotiator'); var Negotiator = require('negotiator');
var statuses = require('./status');
var qs = require('querystring'); var qs = require('querystring');
var Stream = require('stream');
var fresh = require('fresh'); var fresh = require('fresh');
var http = require('http');
var path = require('path');
var mime = require('mime'); var mime = require('mime');
var basename = path.basename;
var extname = path.extname;
var url = require('url'); var url = require('url');
var parse = url.parse; var parse = url.parse;
var stringify = url.format; var stringify = url.format;
@ -527,6 +521,7 @@ module.exports = {
// ensure array // ensure array
if (!Array.isArray(types)) types = [].slice.call(arguments); if (!Array.isArray(types)) types = [].slice.call(arguments);
var mt;
for (var i = 0; i < types.length; i++) { for (var i = 0; i < types.length; i++) {
var type = types[i]; var type = types[i];

View file

@ -4,20 +4,13 @@
*/ */
var debug = require('debug')('koa:response'); var debug = require('debug')('koa:response');
var Negotiator = require('negotiator');
var statuses = require('./status'); var statuses = require('./status');
var Cookies = require('cookies');
var qs = require('querystring');
var Stream = require('stream'); var Stream = require('stream');
var fresh = require('fresh');
var http = require('http'); var http = require('http');
var path = require('path'); var path = require('path');
var mime = require('mime'); var mime = require('mime');
var basename = path.basename; var basename = path.basename;
var extname = path.extname; var extname = path.extname;
var url = require('url');
var parse = url.parse;
var stringify = url.format;
/** /**
* Prototype. * Prototype.