-
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
doc: explain hex
encoding in Buffer API
#31352
doc: explain hex
encoding in Buffer API
#31352
Conversation
fixes: nodejs#29786 refs: nodejs#29792 refs: nodejs#24491
doc/api/buffer.md
Outdated
// Prints <Buffer 1a>, data truncated when data ends in single digit ('7'). | ||
|
||
Buffer.from('1634', 'hex'); | ||
// Prints <Buffer 16 34>, fully qualified hexadecimal data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional nit: Saying that the data was not truncated might be easier to understand than describing it as fully-qualified.
// Prints <Buffer 16 34>, fully qualified hexadecimal data | |
// Prints <Buffer 16 34>, all data represented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Trott, thanks. Fixed it.
doc/api/buffer.md
Outdated
```js | ||
Buffer.from('1ag', 'hex'); | ||
// Prints <Buffer 1a>, data truncated when first non-hexadecimal value | ||
// ('g') encountered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ('g') encountered | |
// ('g') encountered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Trott, ditto.
Landed in e43ee37 |
fixes: #29786 refs: #29792 refs: #24491 PR-URL: #31352 Fixes: #29786 Refs: #29792 Refs: #24491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
fixes: #29786 refs: #29792 refs: #24491 PR-URL: #31352 Fixes: #29786 Refs: #29792 Refs: #24491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
fixes: #29786 refs: #29792 refs: #24491 PR-URL: #31352 Fixes: #29786 Refs: #29792 Refs: #24491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
fixes: #29786 refs: #29792 refs: #24491 PR-URL: #31352 Fixes: #29786 Refs: #29792 Refs: #24491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
fixes: #29786
refs: #29792
refs: #24491
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes