feross / feross/buffer

Support 'buffer' encoding

Open
#227 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
1.9k
Forks
260
PR merge metrics
No merged PRs in 30d

Description

Since Node.js v10.0.0 `crypto.DEFAULT_ENCODING` is deprecated and the default value is now 'buffer', which makes methods default to Buffer objects. I am running into an issue where `Buffer.from` is called on a string, but the encoding is `buffer`. That throws an exception because `Buffer.isEncoding` doesn't support the `buffer` encoding.

I'd suggest to add this to allow users to integrate this with a more up-to-date version of node.

Would it already work if we just adjust `Buffer.isEncoding` and add `buffer` as one of the supported types? Or do we need to do more to make this work?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.