-
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
The behavior of Buffer
’s methods with an empty fill
has not been documented.
#45727
Comments
ErickWendel
pushed a commit
to ErickWendel/node
that referenced
this issue
Dec 12, 2022
PR-URL: nodejs#45794 Fixes: nodejs#45727 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected URL(s)
https://nodejs.org/api/buffer.html
Description of the problem
What happens when
Buffer
’s methods are called with thefill
argument that is empty (a string,Buffer
, array, et cetera.), has not been documented in Node.js 19.2.0’s documentation.I’ve confirmed that
Buffer.alloc(…, "", "UTF-8")
andbuffer.fill("")
fill theBuffer
with zero, which is expected but undocumented behavior.I’m not talking about the
indexOf
orlastIndexOf
methods.The text was updated successfully, but these errors were encountered: