Skip to content
Myr

router: fix optimization on router exit

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

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 1c3bd36 · Browse files · 2 files+10 added−3 removed
This commit

State

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

Diff stats

2 files+10 added−3 removed

  • other:+10 added−3 removed

2 files+10 added−3 removed

modified:lib/router/index.js+9 added-3 removed
441 unmodified lines
442// create Router#VERB functions443methods.concat('all').forEach(function(method){444 proto[method] = function(path){445 var route = this.route(path)446 route[method].apply(route, [].slice.call(arguments, 1));446 route[method].apply(route, slice.call(arguments, 1));447 return this;448 };449});450
54 unmodified lines
505}506507// wrap a function508function wrap(old, fn) {509 return function () {510 var args = [old].concat(slice.call(arguments));509 return function proxy() {510 var args = new Array(arguments.length + 1);511512 args[0] = old;513 for (var i = 0, len = arguments.length; i < len; i++) {514 args[i + 1] = arguments[i];515 }516517 fn.apply(this, args);518 };519}
modified:History.md+1 added
7 unmodified lines
8 * remove unnecessary escaping when `res.jsonp` returns JSON response9 * support non-string `path` in `app.use(path, fn)`10 - supports array of paths11 - supports `RegExp`12 * router: fix optimization on router exit13 * deps: debug@1.0.314 - Add support for multiple wildcards in namespaces15 * deps: methods@1.1.016 - add `CONNECT`
1775 unmodified lines