diff --git a/Readme.md b/Readme.md index 6cc91e8519..b5eb45e57e 100644 --- a/Readme.md +++ b/Readme.md @@ -107,7 +107,7 @@ authors: 54 Aaron Heckmann 1.5% 34 csausdev 1.0% 26 ciaranj 0.7% - 21 Robert Sköld 0.6% + 21 Robert Sköld 0.6% 6 Guillermo Rauch 0.2% 3 Dav Glass 0.1% 3 Nick Poulden 0.1% @@ -153,7 +153,7 @@ authors: 1 Jonathan Zacsh 0.0% 1 Justin Lilly 0.0% 1 Ken Sato 0.0% - 1 Maciej Małecki 0.0% + 1 Maciej Małecki 0.0% 1 Masahiro Hayashi 0.0% ``` diff --git a/lib/application.js b/lib/application.js index 1fde2ad9c5..69bfb5fcbf 100644 --- a/lib/application.js +++ b/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 = '/'; @@ -455,8 +452,7 @@ app.del = app.delete; */ app.render = function(name, options, fn){ - var self = this - , opts = {} + var opts = {} , cache = this.cache , engines = this.engines , view; diff --git a/lib/response.js b/lib/response.js index fb3480a1f0..0d1fa86aec 100644 --- a/lib/response.js +++ b/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 @@ -15,7 +14,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 @@ -716,4 +714,4 @@ res.render = function(view, options, fn){ // render app.render(view, options, fn); -}; \ No newline at end of file +}; diff --git a/lib/router/index.js b/lib/router/index.js index 6003b2b6d7..652b0eb6cf 100644 --- a/lib/router/index.js +++ b/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) { diff --git a/support/app.js b/support/app.js index a8bea23e93..42198d92d9 100644 --- a/support/app.js +++ b/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); \ No newline at end of file +app.listen(8000);