some jshint cleanup
Before adoption: this commit came in with the history the project adopted, so no landing records it.
some more errors but whatever
authored by Jonathan Ong · committed by Jonathan Ong · parent 3112f92 · Browse files · 5 files·+9 added−14 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+9 added−14 removed
- other:+9 added−14 removed
Provenance
- Commit
5572897- Tree
f38adc7- Author
Jonathan Ong <jonathanrichardong@gmail.com>- Committer
Jonathan Ong <jonathanrichardong@gmail.com>- Parent
3112f92
5 files changed+9 added−14 removed
modified:lib/router/index.js+2 added-5 removed
20 unmodified lines21 options = options || {};22 23 function router(req, res, next) {24 router.handle(req, res, next);25- };25+ }26 27 // mixin Router class functions28 router.__proto__ = proto;29 168 unmodified lines198 199 trim_prefix();200 });201 202- return next(err);203-202 function trim_prefix() {203 var c = path[layer.path.length];204 if (c && '/' != c && '.' != c) return next(err);205 35 unmodified lines241 * @api private242 */243 244 proto.process_params = function(route, req, res, done) {247- var self = this;245 var params = this.params;246 247 // captured parameters from the route, keys and values248 var keys = route.keys || [];35 unmodified lines284 done(err);285 }286 287 done();291- };288+ }289 290 // single param callbacks291 function paramCallback(err) {292 var fn = paramCallbacks[paramIndex++];105 unmodified linesmodified:lib/router/layer.js+4 added-2 removed
30 unmodified lines313233343536373839403941424342444546474815 unmodified lines30 unmodified lines var keys = this.keys , params = this.params = {} , m = this.regexp.exec(path) , n = 0; var key; var val;
if (!m) return false;
for (var i = 1, len = m.length; i < len; ++i) { var key = keys[i - 1]; key = keys[i - 1];
try { var val = 'string' == typeof m[i] val = 'string' == typeof m[i] ? decodeURIComponent(m[i]) : m[i]; } catch(e) { var err = new Error("Failed to decode param '" + m[i] + "'");15 unmodified linesmodified:lib/express.js+2 added-5 removed
12345678967891014111213141577 unmodified lines/** * Module dependencies. */
var EventEmitter = require('events').EventEmitter;
var merge = require('merge-descriptors') , mixin = require('utils-merge')
var mixin = require('utils-merge');var proto = require('./application') , Route = require('./router/route') , Router = require('./router') , req = require('./request') , res = require('./response') , res = require('./response');
/** * Expose `createApplication()`. */77 unmodified linesmodified:lib/request.js+1 added-1 removed
147 unmodified lines148 * @api public149 */150 151 req.acceptsLanguage = // backwards compatibility152-req.acceptsLanguages = function(lang){152+req.acceptsLanguages = function(){153 var accept = accepts(this);154 return accept.languages.apply(accept, arguments);155 };156 277 unmodified linesmodified:lib/response.js-1 removed
11 unmodified lines12 , etag = require('./utils').etag13 , statusCodes = http.STATUS_CODES14 , cookie = require('cookie')15 , send = require('send')16- , resolve = require('url').resolve16 , basename = path.basename17 , extname = path.extname18 , mime = send.mime;19 var ServerResponse = http.ServerResponse;783 unmodified lines