-
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
For the next major I think we should consider removing the autogenerated methods from here:
Lines 436 to 443 in 36ae18f
// create Router#VERB functions | |
methods.concat('all').forEach(function (method) { | |
Router.prototype[method] = function (path) { | |
const route = this.route(path) | |
route[method].apply(route, slice.call(arguments, 1)) | |
return this | |
} | |
}) |
We can provide the main ones statically, and instead rely on a new router.method("METHOD", ...)
for the obscure ones. The main reason is to avoid confusion arounds methods such as BIND
, which overwrote the JavaScript .bind
property, which created a number of bug reports in Express 4.
bjohansebas and UlisesGascon
Metadata
Metadata
Assignees
Labels
No labels