router icon indicating copy to clipboard operation
router copied to clipboard

Stop using `methods` to generate methods

Open blakeembrey opened this issue 1 year ago • 1 comments

For the next major I think we should consider removing the autogenerated methods from here: https://github.com/pillarjs/router/blob/36ae18fdf81e3d4ee1c366d833d3a037b335a49d/index.js#L436-L443.

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.

blakeembrey avatar Oct 22 '24 21:10 blakeembrey

Perhaps we should set up a milestone for the next major so we can keep track of all the issue that should go into it?

jonkoops avatar Nov 05 '24 10:11 jonkoops