Skip to content
Myr

lint: remove unused stuff

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jonathan Ong · committed by Jonathan Ong · parent bb157c0 · Browse files · 4 files+8 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+8 added−12 removed

  • other:+8 added−12 removed

4 files+8 added−12 removed

modified:lib/router/index.js+1 added-1 removed
281 unmodified lines
282 // ensure path was given283 if (!path) throw new Error('Router#' + method + '() requires a path');284285 // ensure all callbacks are functions286 callbacks.forEach(function(fn, i){286 callbacks.forEach(function(fn){287 if ('function' == typeof fn) return;288 var type = {}.toString.call(fn);289 var msg = '.' + method + '() requires callback functions but got a ' + type;290 throw new Error(msg);
21 unmodified lines
modified:lib/application.js+1 added-3 removed
8 unmodified lines
9 , debug = require('debug')('express:application')10 , locals = require('./utils').locals11 , View = require('./view')12 , utils = connect.utils13 , path = require('path')14 , http = require('http')13 , http = require('http');15 , join = path.join;1415/**16 * Application prototype.17 */
517 unmodified lines
modified:lib/response.js+2 added-4 removed
13 unmodified lines
14 , cookie = require('cookie')15 , send = require('send')16 , mime = connect.mime17 , basename = path.basename18 , extname = path.extname19 , join = path.join;18 , extname = path.extname;1920/**21 * Response prototype.22 */
659 unmodified lines
682 * @api public683 */684685res.redirect = function(url){687 var app = this.app688 , head = 'HEAD' == this.req.method686 var head = 'HEAD' == this.req.method687 , status = 302688 , body;689690 // allow status / url
112 unmodified lines
modified:lib/utils.js+4 added-4 removed
32 unmodified lines
33 * @return {Function}34 * @api private35 */3637exports.locals = function(obj){37exports.locals = function(){38 function locals(obj){39 for (var key in obj) locals[key] = obj[key];40 return obj;41 };
273 unmodified lines
315316317/**318 * Decodes a URI component. Returns319 * the original string if the component 319 * the original string if the component320 * is malformed.321 * 321 *322 * @param {String} str323 * @return {String}324 * @api private325 */326327exports.decode = function(str) {328 try {329 return decodeURIComponent(str);330 } catch (e) { 330 } catch (e) {331 return str;332 }333}