Title: buffer: documentation incorrect · Issue #5682 · nodejs/node · GitHub
Open Graph Title: buffer: documentation incorrect · Issue #5682 · nodejs/node
X Title: buffer: documentation incorrect · Issue #5682 · nodejs/node
Description: 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 writt...
Open Graph Description: 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 w...
X Description: 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 w...
Opengraph URL: https://github.com/nodejs/node/issues/5682
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"buffer: documentation incorrect","articleBody":"The documentation of `writeU?Int(8|((16|32)[BL]E))?` [states](https://github.com/nodejs/node/blob/master/doc/api/buffer.markdown#bufwriteintlevalue-offset-bytelength-noassert) that the return value is the number of bytes written, while it [actually is](https://github.com/nodejs/node/blob/e2488fa953ee4e9673ba51f20bc5b7eff2e0ffba/lib/buffer.js#L874) the offset plus this number.\n\nThis 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 \u0026 backwards compatibility) or fix the documentation.\n","author":{"url":"https://github.com/fb55","@type":"Person","name":"fb55"},"datePublished":"2016-03-13T10:44:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5682/node/issues/5682"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:734f345c-4132-ab76-5728-cf84860b35ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE1E:2CFBC2:F6A048:15531BF:6A4DF2B1 |
| html-safe-nonce | 5f9e60815eeb0bf6da2f0883a0e287643614576bb5c8a654a48b30a76a2677bb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTFFOjJDRkJDMjpGNkEwNDg6MTU1MzFCRjo2QTRERjJCMSIsInZpc2l0b3JfaWQiOiIxNDMwMTczODc3NDEzOTk5MjgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ec8c3b9c7db5df2d882a22ecc2b88bde70dbd968b140c0712f484a421f0620d7 |
| hovercard-subject-tag | issue:140474133 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/5682/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c098710503ebba3284bca245a66f2529f341bdf3e163e701ad7c22a072300d71/nodejs/node/issues/5682 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c098710503ebba3284bca245a66f2529f341bdf3e163e701ad7c22a072300d71/nodejs/node/issues/5682 |
| og:image:alt | 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 w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fb55 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width