-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer: documentation incorrect #5682
Comments
mscdex
added
buffer
Issues and PRs related to the buffer subsystem.
doc
Issues and PRs related to the documentations.
labels
Mar 13, 2016
IMHO I think fixing the documentation would be best (for now). |
cc @trevnorris |
This is definitely a documentation issue. That documentation addition was added in 6ad1f7b on Jan 25, 2016. While the feature of returning the offset after write was originally added in 4a34c69 on Jul 12, 2013 (pr: nodejs/node-v0.x-archive#5843). |
Closing as 939d6ef has landed |
abhishekumar-tyagi
pushed a commit
to abhishekumar-tyagi/node
that referenced
this issue
May 5, 2024
Fixes: https:github.com/nodejs/node/issues/5682 PR-URL: nodejs/node#5736 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
abhishekumar-tyagi
pushed a commit
to abhishekumar-tyagi/node
that referenced
this issue
May 5, 2024
Fixes: https:github.com/nodejs/node/issues/5682 PR-URL: nodejs/node#5736 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation of
writeU?Int(8|((16|32)[BL]E))?
states that the return value is the number of bytes written, while it actually is the offset plus this number.This is inconsistent with a plain
write
, which returns only the bytes written, so before sending a PR, I wanted to ask which option is preferred: Correct the code (which might break modules & backwards compatibility) or fix the documentation.The text was updated successfully, but these errors were encountered: