Skip to content

buf.slice() return buffer object with not correct ArrayBuffer length  #22299

@sky-train

Description

@sky-train

const buf = Buffer.from([1,2,3]);
console.log( buf.slice(1,2).buffer );

// display
//ArrayBuffer { byteLength: 8192 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.questionIssues that look for answers.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions