Skip to content

The behavior of Buffer’s methods with an empty fill has not been documented. #45727

Description

@issuefiler

Affected URL(s)

https://nodejs.org/api/buffer.html

Description of the problem

What happens when Buffer’s methods are called with the fill 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") and buffer.fill("") fill the Buffer with zero, which is expected but undocumented behavior.

I’m not talking about the indexOf or lastIndexOf methods.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.docIssues and PRs related to Node.js documentation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions