Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Update deprecated Buffer usage #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andygout
Copy link

This PR updates the usage of new Buffer which will output the following warning:

(node:9017) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

References

new Buffer(number)            // Old
Buffer.alloc(number)          // New

new Buffer(string)            // Old
Buffer.from(string)           // New

new Buffer(string, encoding)  // Old
Buffer.from(string, encoding) // New

new Buffer(...arguments)      // Old
Buffer.from(...arguments)     // New

@andygout andygout requested a review from a team as a code owner February 22, 2024 09:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant