Skip to content

Replace Buffer with Uint8Array #1883

@dawsbot

Description

@dawsbot

What is the bug?
This is a question about a potential bug!

All instances of JS Buffer could be replaced with Uint8Array. Why would we want to?

TLDR:

  1. Buffer does not work cross-platform
  2. Buffer modifies a global object which can be accessed by third-party dependencies
  3. slice mutates the original object

Additional context (optional)
This is a question and discussion beginning. Please leave feedback! If you want to learn more about why this matters, read here: https://sindresorhus.com/blog/goodbye-nodejs-buffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    s-triageNeeds to be reviewed, designed and prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions