From 0c330ffb1a2832bfdd655f40bbeacf1a2f1e7e81 Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Mon, 9 Dec 2013 01:53:18 -0800 Subject: [PATCH] lint: remove unused references, fix global leak --- lib/context.js | 3 --- lib/request.js | 7 +------ lib/response.js | 7 ------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/context.js b/lib/context.js index 03b2d29..584f0e8 100644 --- a/lib/context.js +++ b/lib/context.js @@ -4,9 +4,6 @@ */ var debug = require('debug')('koa:context'); -var Request = require('./request'); -var Response = require('./response'); -var Cookies = require('cookies'); var http = require('http'); /** diff --git a/lib/request.js b/lib/request.js index 69ba291..f445ede 100644 --- a/lib/request.js +++ b/lib/request.js @@ -5,15 +5,9 @@ var debug = require('debug')('koa:context'); var Negotiator = require('negotiator'); -var statuses = require('./status'); var qs = require('querystring'); -var Stream = require('stream'); var fresh = require('fresh'); -var http = require('http'); -var path = require('path'); var mime = require('mime'); -var basename = path.basename; -var extname = path.extname; var url = require('url'); var parse = url.parse; var stringify = url.format; @@ -527,6 +521,7 @@ module.exports = { // ensure array if (!Array.isArray(types)) types = [].slice.call(arguments); + var mt; for (var i = 0; i < types.length; i++) { var type = types[i]; diff --git a/lib/response.js b/lib/response.js index 30611a1..a3ea91b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -4,20 +4,13 @@ */ var debug = require('debug')('koa:response'); -var Negotiator = require('negotiator'); var statuses = require('./status'); -var Cookies = require('cookies'); -var qs = require('querystring'); var Stream = require('stream'); -var fresh = require('fresh'); var http = require('http'); var path = require('path'); var mime = require('mime'); var basename = path.basename; var extname = path.extname; -var url = require('url'); -var parse = url.parse; -var stringify = url.format; /** * Prototype.