Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove unused variables

Tests and examples with unused variables are unchanged.
  • Loading branch information...
commit dadf57cc8b913685c2f11243abe2409b7ffa641e 1 parent 764b6c6
@defunctzombie defunctzombie authored
View
10 lib/application.js
@@ -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
6 lib/response.js
@@ -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
6 lib/router/index.js
@@ -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
4 support/app.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.