Skip to content
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

Buffer#fill should accept string arguments #963

Closed
SheetJSDev opened this issue Aug 2, 2022 · 1 comment
Closed

Buffer#fill should accept string arguments #963

SheetJSDev opened this issue Aug 2, 2022 · 1 comment
Labels
node.js Compatibility with Node.js APIs

Comments

@SheetJSDev
Copy link
Contributor

Repro:

const A = Buffer.allocUnsafe(26).fill('!');
const B = Buffer.allocUnsafe(26).fill("!".charCodeAt(0));
console.log(A); console.log(B);

Node shows two Buffers filled with 0x21 bytes, while Bun does not fill in the first case.

@Jarred-Sumner Jarred-Sumner added the node.js Compatibility with Node.js APIs label Aug 3, 2022
@Jarred-Sumner
Copy link
Collaborator

Fixed as of v0.1.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

2 participants