Permalink
Browse files

Merge pull request #1388 from shtylman/unused-variables

remove unused variables
  • Loading branch information...
2 parents 764b6c6 + dadf57c commit 8959ff155bc1011e328f7cc6f4cbcc01af1cc988 @tj tj committed Oct 27, 2012
Showing with 8 additions and 18 deletions.
  1. +3 −7 lib/application.js
  2. +2 −4 lib/response.js
  3. +2 −4 lib/router/index.js
  4. +1 −3 support/app.js
View
@@ -9,12 +9,10 @@ var connect = require('connect')
, debug = require('debug')('express:application')
, locals = require('./utils').locals
, View = require('./view')
- , url = require('url')
, utils = connect.utils
, path = require('path')
, http = require('http')
- , join = path.join
- , fs = require('fs');
+ , join = path.join;
/**
* Application prototype.
@@ -33,7 +31,6 @@ var app = exports = module.exports = {};
*/
app.init = function(){
- var self = this;
this.cache = {};
this.settings = {};
this.engines = {};
@@ -106,7 +103,7 @@ app.defaultConfiguration = function(){
*/
app.use = function(route, fn){
- var app, home, handle;
+ var app, handle;
// default route to '/'
if ('string' != typeof route) fn = route, route = '/';
@@ -454,8 +451,7 @@ app.del = app.delete;
*/
app.render = function(name, options, fn){
- var self = this
- , opts = {}
+ var opts = {}
, cache = this.cache
, engines = this.engines
, view;
View
@@ -2,8 +2,7 @@
* Module dependencies.
*/
-var fs = require('fs')
- , http = require('http')
+var http = require('http')
, path = require('path')
, connect = require('connect')
, utils = connect.utils
@@ -14,7 +13,6 @@ var fs = require('fs')
, send = connect.static.send
, cookie = require('cookie')
, send = require('send')
- , crc = require('crc')
, mime = connect.mime
, basename = path.basename
, extname = path.extname
@@ -715,4 +713,4 @@ res.render = function(view, options, fn){
// render
app.render(view, options, fn);
-};
+};
View
@@ -5,8 +5,7 @@
var Route = require('./route')
, utils = require('../utils')
, debug = require('debug')('express:router')
- , parse = require('connect').utils.parseUrl
- , methods = require('methods');
+ , parse = require('connect').utils.parseUrl;
/**
* Expose `Router` constructor.
@@ -93,8 +92,7 @@ Router.prototype._dispatch = function(req, res, next){
, paramVal
, route
, keys
- , key
- , ret;
+ , key;
// match next route
function nextRoute(err) {
View
@@ -16,8 +16,6 @@ app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.locals.self = true;
-var repo = require('../package.json');
-
app.get('/render', function(req, res){
res.render('hello');
});
@@ -65,4 +63,4 @@ app.get('/match', function(req, res){
res.send('Hello World\n');
});
-app.listen(8000);
+app.listen(8000);

0 comments on commit 8959ff1

Please sign in to comment.