Skip to content
Myr

Remove redundant `.all` function.

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

authored by Blake Embrey · committed by Blake Embrey · parent 51e80ff · Browse files · 1 file+1 added−18 removed
This commit

State

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

Diff stats

1 file+1 added−18 removed

  • other:+1 added−18 removed

1 file+1 added−18 removed

modified:lib/router/index.js+1 added-18 removed
376 unmodified lines
377 this.stack.push(layer);378 return route;379};380381/**382 * Special-cased "all" method, applying the given route `path`,383 * middleware, and callback to _every_ HTTP method.384 *385 * @param {String} path386 * @param {Function} ...387 * @return {app} for chaining388 * @api public389 */390391proto.all = function(path, fn) {392 var route = this.route(path);393 methods.forEach(function(method){394 route[method](fn);395 });396};397381// create Router#VERB functions399methods.forEach(function(method){382methods.concat('all').forEach(function(method){383 proto[method] = function(path, fn){384 var self = this;385 self.route(path)[method](fn);386 return self;
3 unmodified lines