Request.accepts documentation
Description
I want to contribute, I say * To do: update docs.* in Request.accepts. How would you like me to update the docs?
Expectations
Guide on how to implement or just remove the comment :)
The JSDoc snippets are certainly outdated (the TODO was introduced almost 12 years ago in https://github.com/expressjs/express/commit/cec0c06a70c874298761282984573475293c0071). Most recent change to existing lines is https://github.com/expressjs/express/commit/fce3d14b5ce51e75a1636ac4ebc251c4017e038b (#2663) from 10 years ago. In the meantime, the documentation on the website (repo) has received some improvements and fixes - most importantly https://github.com/expressjs/expressjs.com/pull/1147 and https://github.com/expressjs/expressjs.com/pull/504, but also https://github.com/expressjs/expressjs.com/pull/324 which reworded the description.
I'd suggest porting the changes made to the API docs on expressjs.com - especially the return types. I wouldn't be surprised if there is more outdated JSDoc documentation, but I don't have time to check that.
@krzysdz So sounds like a good opportunity for a first PR. Taking this :)
https://github.com/expressjs/express/pull/6936
Hi maintainers, This PR updates the JSDoc for req.accepts() so it matches the actual behavior of the underlying accepts module (returning false instead of undefined, and not splitting comma-separated strings).
It addresses issue #6935. Kindly requesting a review when you get time. Thank you!