-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: add Buffer.from(string) to functions that use buffer pool #52801
doc: add Buffer.from(string) to functions that use buffer pool #52801
Conversation
There appear to be a number of additional commits here that are unrelated to the doc change. Can I ask you to remove the extra commits? |
7fdf253
to
bf02a19
Compare
Sorry about that, everything should be cleaned up now. |
@jasnell Does this change feel substantive? I wanted to make this PR when I had some time, because I'd used buffer.from(string) and was confused as to why the underlying buffer had other data in it. When I didn't see any explanation in the buffer.from(string) section of the docs, I actually went to the source code and found where the buffer pool was used when creating strings long before I noticed that this behavior was documented at the bottom of buffer.from(array) 😂. It would've saved me some time had it been in the buffer.from(string) section of the docs, so I thought it might help others as well. |
If anyone has capacity to review this PR, I'd greatly appreciate it! If it doesn't seem worth including, I can certainly close it 🙂 |
95178d7
to
18263bd
Compare
18263bd
to
a439e5a
Compare
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.
Thanks for the changes!
Oh, sorry for asking one more thing but can you please change the commit message to use |
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references.
a439e5a
to
214da9e
Compare
No problem! I'll keep that in mind for future PRs 🙂 |
Landed in ee8e841 |
@Whitecx congratulations on your first PR, thanks for contributing! |
Thank you!! And thank you for supporting with your review 😊 |
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references. PR-URL: #52801 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references. PR-URL: nodejs#52801 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references. PR-URL: nodejs#52801 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references. PR-URL: #52801 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references. PR-URL: #52801 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
Buffer.from(string) is one of the functions that may use the pre-allocated buffer. It's mentioned in the description of Buffer.from(array), but not in Buffer.from(string), or in the two other places where functions that behave this way are listed, so this commit adds those references.