Skip to content

docs: fix typos and a stale API reference in lib comments - #7512

Open
fmtappendf wants to merge 1 commit into
expressjs:masterfrom
fmtappendf:docs/fix-lib-comment-typos
Open

fmtappendf wants to merge 1 commit into
expressjs:masterfrom
fmtappendf:docs/fix-lib-comment-typos

Conversation

@fmtappendf

Copy link
Copy Markdown

Three comment defects in lib/, each checked against the code it describes.

  • lib/request.js (req.ip JSDoc): The is the remote address on the socket unless → This is the remote address on the socket unless. As written the sentence does not parse.
  • lib/response.js (res.download): // support optional filename, where options may be in it's place → in its place. it's is the contraction, its the possessive.
  • lib/response.js (res.format JSDoc): the comment says the method uses req.accepted, "an array of acceptable types ordered by their quality values". req.accepted was removed in Express 4 — History.md lists it under removed APIs ("req.accepted* - use req.accepts*() instead") — and the implementation calls req.accepts(keys) and uses the single best match it returns. Corrected to name the call that is actually made.

Comment text only: every changed line sits inside a comment and no code line is touched, so behaviour is unchanged.

A fourth instance of the same class, lib/application.js: "Render the given view name name with options", is left alone because #7388 already fixes that exact line.

Diff is 2 files and 3 comment fixes — small, clean, and non-controversial.

@krzysdz krzysdz added the docs Documentations issues label Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentations issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants