Skip to content

Deprecation of new Buffer(string) #1

@bjoluc

Description

@bjoluc

Hi @doowb,

since new Buffer(string) is deprecated since Node v6 and emits a deprecation warning when run outside node_modules (such as when append-buffer is bundled in Node.js CLI apps), I'd like to ask for your opinion about replacing it with Buffer.from(string) when available. Fully replacing it would call for a v2 of this lib, likely taking a long time to be adopted (esp. given the large number of transitive dependents), so I'd check for Buffer.from to be defined instead. Happy to submit a PR if you agree.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions